-
Notifications
You must be signed in to change notification settings - Fork 21
Administration Commands
Jace Manshadi edited this page Sep 15, 2024
·
2 revisions
allows the Bot_manager to be able to create a graph that can help illustrate certain details about the usage of the commands.
- Collecting stats: the
save_command_statis called bysave_command_stats[when it's a text command] oron_app_command_completion[when it's a slash command] in order to save an entry toCommandStatwith the details needed to visualize the data. - Generate graphs:
this codeis responsible for reading the results from the database and usingmatplotlib.pyplotandnumpyto generate the graph that is saved as an image and then send to discord via an attachment to a message.
- Deleting Log Channels: implemented with
delete_log_channels. it's an easy way to delete all the log channels that the bot created so it can run once your dev work is over to clean up your guild. - Purge Messages in Channel: implemented with
purge_messages. An easy way to delete the last X messages from a channel if you want to delete messages you used to test the bot in a local guild.
-
load/unload/reloadcommands: not used much due to our C.I. where we re-deploy wall_e every time a change has been made. Nevertheless, we haveload,unload,reloadcommands that allow us to as the name suggest,load,unload, andreloada cog/extension. To note however, that if you load or reload a cog after the bot has already started and connected to the discord gateway, any commands that listen for theon_readysignal to setup stuff like channels needed for a certain cog will not run causeon_readyis a signal received by the bot only on initial bot connection and not cog loading.- How the loaded extensions are retrieved from the autocomplete functions and provided to the
load/unload/reloadfunctions:wall_e/utilities/autocomplete/extensions_load_choices.py
- How the loaded extensions are retrieved from the autocomplete functions and provided to the
a command that allows the Bot_manager to announce a new feature on the announcement channel via the bot.
a sync command that allows the re-syncing of the bot tree