Page:
core.py
Clone
2
core.py
Akumatic edited this page 2019-10-09 14:08:12 +02:00
Table of Contents
Extension: core.py
This extension gives the bot core functionality (error and module handling).
Listener
Listener | Description |
---|---|
on_ready | Whenever the bot is ready, it prints ("Bot is running!" into terminal and changes the displayed game. |
on_guild_join | Whenever the bot joins a guild, it adds a new empty dict to serverCfg with guild.id as key. |
on_guild_remove | Whenever the bot leaves a guild, it removes the dict with guild.id as key. |
on_command_error | Whenever a command error occurs, it sends the given error log to the corresponding context or to the owner's direct messages. |
Commands
Command | Arguments | Required Permission | Description |
---|---|---|---|
stop |
Bot Owner | Unloads all extensions and stops the bot. | |
setGame |
{text} | Bot Owner | Sets the current displayed game. If no text gets provided, it just prints the help command. |
load |
{ext} [true] | Bot Owner | Loads {ext} if its not loaded yet. {ext} gets added to autostart if you add [true].1 |
unload |
{ext} [true] | Bot Owner | Unloads {ext} if its loaded. {ext} gets removed from autostart if you add [true].1 |
reload |
{ext} [true] | Bot Owner | Reloads {ext} if its loaded.1 |
printExt |
Bot Owner | Sends all loaded extensions. |
1 {ext} has to be in the extensions
folder. Pass just the name (without .py) to the command.