Class CommandsNextUtilities
Various CommandsNext-related utilities.
Inheritance
System.Object
CommandsNextUtilities
Namespace: DSharpPlus.CommandsNext
Assembly: cs.temp.dll.dll
Syntax
public static class CommandsNextUtilities
Methods
GetMentionPrefixLength(DiscordMessage, DiscordUser)
Checks whether the message contains a specified mention prefix.
Declaration
public static int GetMentionPrefixLength(this DiscordMessage msg, DiscordUser user)
Parameters
Type | Name | Description |
---|---|---|
DiscordMessage | msg | Message to check. |
DiscordUser | user | User to check for. |
Returns
Type | Description |
---|---|
System.Int32 | Positive number if the prefix is present, -1 otherwise. |
GetStringPrefixLength(DiscordMessage, String, StringComparison)
Checks whether the message has a specified string prefix.
Declaration
public static int GetStringPrefixLength(this DiscordMessage msg, string str, StringComparison comparisonType = null)
Parameters
Type | Name | Description |
---|---|---|
DiscordMessage | msg | Message to check. |
System.String | str | String to check for. |
StringComparison | comparisonType | Method of string comparison for the purposes of finding prefixes. |
Returns
Type | Description |
---|---|
System.Int32 | Positive number if the prefix is present, -1 otherwise. |