Delegate PrefixResolverDelegate
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.
Namespace: DSharpPlus.CommandsNext
Assembly: cs.temp.dll.dll
Syntax
public delegate Task<int> PrefixResolverDelegate(DiscordMessage msg);
Parameters
Type | Name | Description |
---|---|---|
DiscordMessage | msg | Message to check for prefix. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | Position of the command invocation or -1 if not present. |