Skip to main content

Module prefix_argument

Module prefix_argument 

Source
Expand description

Everything related to parsing command arguments from a text message

Structs§

CodeBlock
A command parameter type for Discord code blocks
CodeBlockError
Error thrown when parsing a malformed CodeBlock (CodeBlock::pop_from)
InvalidBool
Error thrown when the user enters a string that is not recognized as a boolean
InvalidChannelId
Error thrown when the user enters a string that cannot be parsed correctly.
InvalidChoice
Error thrown when the user enters a string that is not recognized by a ChoiceParameter-derived enum
InvalidRoleId
Error thrown when the user enters a string that cannot be parsed correctly.
InvalidUserId
Error thrown when the user enters a string that cannot be parsed correctly.
KeyValueArgs
A command parameter type for key-value args
MissingAttachment
Error thrown in prefix invocation when there’s too few attachments
TooFewArguments
Error thrown if user passes too few arguments to a command
TooManyArguments
Error thrown if user passes too many arguments to a command

Traits§

PopArgument
Parse a value out of a string by popping off the front of the string. Discord message context is available for parsing, and IO may be done as part of the parsing.