Reaction Manager
This page shows you everything about ReactionManager.
Last updated
This page shows you everything about ReactionManager.
Last updated
Initializer of ReactionManager
, represents a reaction manager that manages reactions. Inherits EventManager
.
All inherited methods and attributes from EventManager are unlisted.
database
(DatabaseManager)
The database the reaction manager will work on.
Passed in initializer.
table
(str)
The database table the reaction manager will work on.
Passed in initializer.
bot
(commands.Bot)
The bot that the reaction manager will work on.
Passed in initializer.
format_data()
Formats data into an organized dict. This function is a classmethod (static). Parameters
data
(list)
Data to format.
checks(guild_id, message_id, emoji)
Returns a dictionary of checks that are used as database checks.
This function is a classmethod (static).
Parameters
guild_id
(int)
The value of the guild key.
message_id
(int)
The value of the message key.
emoji
(str)
The value of the emoji key.
create_reaction(guild, message, role, emoji, remove_on_reaction)
Creates a reaction role and saves it in the database.
A record wont be created if a record with the same values already exists.
Parameters
guild
(discord.Guild)
The guild of the reaction role.
message
(discord.Message)
The message of the reaction role.
role
(discord.Role)
The role of the reaction role.
If None
, calls on-reaction-event.
Raises
EmojiError
Cannot add reaction to message.
delete_reaction(guild, message, emoji)
Deletes a reaction role from the database.
Parameters
guild
(discord.Guild)
The guild of the reaction role.
message
(discord.Message)
The message of the reaction role.
emoji
(str)
The emoji of the reaction role.
on_reaction_event(guild, channel, message, member, emoji)
This event is called if a reaction role is triggered but role is None
.
Parameters
guild
(discord.Guild)
The guild of the reaction role.
channel
(discord.TextChannel)
The channel of the reaction role.
message
(discord.Message)
The message of the reaction role.
member
(discord.Member)
The reaction member.
emoji
(str)
The emoji of the reaction role.
database
format_data
on_reaction_event
table
checks
bot
create_reaction
delete_reaction