Delegate PrefixResolverDelegate
- Namespace
- DSharpPlus.CommandsNext
- Assembly
- DSharpPlus.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.
Returns
- Task<int>
Position of the command invocation or -1 if not present.