Skip to content

Administration Commands

Jace Manshadi edited this page Sep 15, 2024 · 2 revisions

Features

Command Statistics

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_stat is called by save_command_stats [when it's a text command] or on_app_command_completion [when it's a slash command] in order to save an entry to CommandStat with the details needed to visualize the data.
  • Generate graphs: this code is responsible for reading the results from the database and using matplotlib.pyplot and numpy to generate the graph that is saved as an image and then send to discord via an attachment to a message.

Dev Tools for Local Guild

  • 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.

Extension/Cog Loading

  • load/unload/reload commands: not used much due to our C.I. where we re-deploy wall_e every time a change has been made. Nevertheless, we have load, unload, reload commands that allow us to as the name suggest, load, unload, and reload a 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 the on_ready signal to setup stuff like channels needed for a certain cog will not run cause on_ready is a signal received by the bot only on initial bot connection and not cog loading.

Other Commands

announce

a command that allows the Bot_manager to announce a new feature on the announcement channel via the bot.

sync

a sync command that allows the re-syncing of the bot tree

Clone this wiki locally