Created core.py (markdown)

Akumatic 2019-10-09 13:43:18 +02:00
parent 06d5d85ea1
commit 95728a6274

22
core.py.md Normal file

@ -0,0 +1,22 @@
# 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|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}<sup>1</sup> if its not loaded yet. {ext} gets added to autostart if you add [true].|
|`unload {ext} [true]`|Bot Owner|Unloads {ext}<sup>1</sup> if its loaded. {ext} gets removed from autostart if you add [true].|
|`reload {ext}`|Bot Owner|Reloads {ext}<sup>1</sup> if its loaded.|
|`printExt`|Bot Owner|Sends all loaded extensions.|
<sup>1</sup> {ext} has to be in the `extensions` folder. Pass just the name (without .py) to the command.