class Bot(discord.Client):
The bot class inherits from discord.Client :guidsId: a set of all guilds id the bot is in :guildsDict: a dict of all guildData the bot is in, with the guild id as key :tldrLoop: the loop for the tldr command :moodLoop: the loop for the mood command :socialGraphLoop: the loop for the social graph command :autoModLoop: the loop for the auto mod command :moodUpdates: a list of list of tuples (guildId, updateType) where updateType is True for refresh and False for reset :moodUpdateMinute: the current minute of the "clock" used to know when to update the moods :socialGraphWorker: the worker for the social graph command
Method | __init__ |
Constructor :param args: :param kwargs: |
Async Method | fetch |
Fetches the reaction of the consent message :return: None |
Method | fetch |
Fetches the history of a channel before a specific message :param channel: channel to fetch the history from :param limit: limit of messages to fetch :param message: message to fetch the history before :return: the history... |
Method | fetch |
Fetches a message from a channel :param channel: channel to fetch the message from :param messageId: id of the message to fetch :return: the message |
Async Method | guild |
Called when the bot joins a guild :param guild: The guild the bot joined :return: None |
Async Method | guild |
Called when the bot leaves a guild :param guildId: The id of the guild the bot left :return: None |
Async Method | initialise |
Loads the social graphs from a json file and initialises the social graph worker :return: None |
Async Method | on |
Called when the bot joins a guild :param guild: The guild the bot joined :return: None |
Async Method | on |
Called when the bot leaves a guild :param guild: The guild the bot left :return: None |
Async Method | on |
Called when a message is sent in a channel the bot can see :param message: The message sent :return: None |
Async Method | on |
Called when a message is edited :param before: The message before it was edited :param after: The message after it was edited :return: None |
Async Method | on |
Called when a reaction is added :param payload: The payload of the reaction :return: None |
Async Method | on |
Called when a reaction is removed :param payload: The payload of the reaction :return: None |
Async Method | on |
Called when the bot is ready :return: None |
Method | reply |
Sends a messages to a specific channel :param content: textual content of the message :param message: message to reply to |
Method | save |
Undocumented |
Method | send |
Sends a messages to a specific channel :param content: textual content of the message :param channel: channel to send the message in |
Method | time |
Keeps track of time and calls the functions that need to be called every minute |
Instance Variable | auto |
Undocumented |
Instance Variable | guilds |
Undocumented |
Instance Variable | guilds |
Undocumented |
Instance Variable | mood |
Undocumented |
Instance Variable | mood |
Undocumented |
Instance Variable | mood |
Undocumented |
Instance Variable | social |
Undocumented |
Instance Variable | social |
Undocumented |
Instance Variable | tldr |
Undocumented |
Fetches the history of a channel before a specific message :param channel: channel to fetch the history from :param limit: limit of messages to fetch :param message: message to fetch the history before :return: the history
Fetches a message from a channel :param channel: channel to fetch the message from :param messageId: id of the message to fetch :return: the message
Parameters | |
channel:discord.TextChannel | Undocumented |
message | Undocumented |
Returns | |
discord.Message | Undocumented |
Called when a message is sent in a channel the bot can see :param message: The message sent :return: None
Called when a message is edited :param before: The message before it was edited :param after: The message after it was edited :return: None
Sends a messages to a specific channel :param content: textual content of the message :param message: message to reply to
Parameters | |
content:str | Undocumented |
message:discord.Message | Undocumented |
Sends a messages to a specific channel :param content: textual content of the message :param channel: channel to send the message in
Parameters | |
content:str | Undocumented |
channel:discord.TextChannel | Undocumented |