Delegate PrefixResolverDelegate
- Namespace
- DisCatSharp.CommandsNext
- Assembly
- DisCatSharp.CommandsNext.dll
Represents a delegate for a function that takes a message, and returns the position of the start of command invocation in the message. It has to return -1 if prefix is not present.
It is recommended that helper methods GetStringPrefixLength(DiscordMessage, string, StringComparison) and GetMentionPrefixLength(DiscordMessage, DiscordUser) be used internally for checking. Their output can be passed through.
public delegate Task<int> PrefixResolverDelegate(DiscordMessage msg)
Parameters
msg
DiscordMessageMessage to check for prefix.