Method GetStringPrefixLength
- Namespace
- DisCatSharp.CommandsNext
- Assembly
- DisCatSharp.CommandsNext.dll
GetStringPrefixLength(DiscordMessage, string, StringComparison)
Checks whether the message has a specified string prefix.
public static int GetStringPrefixLength(this DiscordMessage msg, string str, StringComparison comparisonType = StringComparison.Ordinal)
Parameters
msg
DiscordMessageMessage to check.
str
stringString to check for.
comparisonType
StringComparisonMethod of string comparison for the purposes of finding prefixes.
Returns
- int
Positive number if the prefix is present, -1 otherwise.