Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xmistt/rebootpy/llms.txt
Use this file to discover all available pages before exploring further.
Context
Attributes
The message that triggered the command being executed.
The bot that contains the command being executed.
The list of transformed arguments that were passed into the command. If this is accessed during the
event_command_error event then this list could be incomplete.A dictionary of transformed arguments that were passed into the command. Similar to
args, if this is accessed in the event_command_error event then this dict could be incomplete.The prefix that was used to invoke the command.
The command (i.e.
Command or its subclasses) that is being invoked currently.The command name that triggered this invocation. Useful for finding out which alias called the command.
The subcommand (i.e.
Command or its subclasses) that was invoked. If no valid subcommand was invoked then this is equal to None.The string that was attempted to call a subcommand. This does not have to point to a valid registered subcommand and could just point to a nonsense string. If nothing was passed to attempt a call to a subcommand then this is set to
None.A boolean that indicates if the command failed to be parsed, checked, or invoked.
Properties
Checks if the invocation context is valid to be invoked with.
Returns the cog associated with this context’s command.
None if it does not exist.The party this message was sent from.
None if the message was not sent from a party.The author of the message.
The
Friend object for this friend, None if the client is not friends with the author.The
PartyMember object for this friend, None if the client is not in the same party as the author.Similar to
ClientPartyMember except that it returns ClientUser when not sent from a party.Methods
invoke
Command holds internally.
Note: This does not handle converters, checks, cooldowns, pre-invoke, or after-invoke hooks in any matter. It calls the internal callback directly as-if it was a regular function.
Warning: The first parameter passed must be the command being invoked.
Parameters:
command(Command): A command or subclass of a command that is going to be called.*args: The arguments to use.**kwargs: The keyword arguments to use.
reinvoke
invoke() except that it bypasses checks, cooldowns, and error handlers.
Note: If you want to bypass UserInputError derived exceptions, it is recommended to use the regular invoke() as it will work more naturally. After all, this will end up using the old arguments the user has used and will thus just fail again.
Parameters:
call_hooks(bool): Whether to call the before and after invoke hooks.restart(bool): Whether to start the call chain from the very beginning or where we left off (i.e. the command that caused the error). The default is to start where we left off.
send
content(str): The contents of the message.
send_help
Cog or a Command.
Note: Due to the way this function works, instead of returning something similar to HelpCommand.command_not_found() this returns None on bad input or no help command.
Parameters:
entity(Optional[Union[Command, Cog, str]]): The entity to show help for.page(int): The page to show. Only has an effect if the entity is either the bot or a cog.
Any - The result of the help command, if any.
Examples: