API Reference¶
Bot¶
The default order in which everything is called and what methods call what:
-
process_raw_reaction_commands(payload)get_raw_reaction_context(payload)_early_invokechecks if reaction is a command that can be invoked without prefix. Ifinvoke_without_prefixisTrue, returns a valid ctx here instead of continuing.reaction_before_processing(ctx)_wait_for_emoji_streamuseswait_forfor reactions and tries to find a command from them.reaction_after_processing(ctx)starts as a task
- runs checks, before invokes, arg conversion, and all the normal stuff.
See also
process_reaction_commands() and
get_reaction_context() for invoking from
on_reaction_add() instead of raw methods.
ReactionBotMixin¶
Can use this to add reaction commands for your own bot subclass. Just be sure nothing conflicts.
class OtherSubclassedBot(commands.Bot):
# stuff here
class SubclassedBot(ReactionBotMixin, OtherSubclassedBot):
pass
Note
Probably use/subclass ReactionBot or AutoShardedReactionBot
instead.
ReactionBot¶
AutoShardedReactionBot¶
Woah look at you. Imagine having a bot big enough to use
AutoShardedReactionBot.
ReactionCommand¶
ReactionCommand classes and other related stuff. Mostly behave like normal
commands. Only big difference is emojis
and altered _parse_arguments for
argument parsing.
Decorators¶
Decorators for adding commands in cogs.
ReactionContext¶
There’s a lot of weird crap that goes on here if using raw methods. A
ProxyBase is used if anything from
payload cannot be
resolved to a matching object from cache.
Ex: A ProxyMember or ProxyUser may be used instead of
discord.Member or discord.User if get_member()
or get_user() return None and
payload.member is None.
ReactionHelp¶
Even comes with a help command. If you want to customize it there’s not really a simple way so you’re basically subclassing help.