Class MessageExtensions
Provides extension methods for IUserMessage that relates to commands.
public static class MessageExtensions
- Inheritance
-
MessageExtensions
- Inherited Members
Methods
HasCharPrefix(IUserMessage, char, ref int)
Gets whether the message starts with the provided character.
public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos)
Parameters
msg
IUserMessageThe message to check against.
c
charThe char prefix.
argPos
intReferences where the command starts.
Returns
HasMentionPrefix(IUserMessage, IUser, ref int)
Gets whether the message starts with the user's mention string.
public static bool HasMentionPrefix(this IUserMessage msg, IUser user, ref int argPos)
Parameters
msg
IUserMessageuser
IUserargPos
int
Returns
HasStringPrefix(IUserMessage, string, ref int, StringComparison)
Gets whether the message starts with the provided string.
public static bool HasStringPrefix(this IUserMessage msg, string str, ref int argPos, StringComparison comparisonType = StringComparison.Ordinal)
Parameters
msg
IUserMessagestr
stringargPos
intcomparisonType
StringComparison