CSSS/wall_e

update documentation

Closed this issue · 1 comments

difference between a command, on_ready and a listener

Services to document

Bans

wall_e implements its own version of a ban system because discord at the time of writing this, a discord ban is an I.P. ban and given the people on residence tend to share the same public IP, a discord ban may block alot of non-offenders.

Given that, we had to implement our own version of a ban system which was user-based rather than I.P.-based.

Leveling

the CSSS discord guild used to use the Mee6 until a point and leveling system was instead implemented into wall_e itself via the the Levelling cog.

ManageCog

This was mainly created in order to ensure that our bot setup in TEST [potentially multiple versions of wall_e all logged into the same guild if there are multiple Prs active] did not conflict with each other. This was done in 2 ways:

  1. creates a "main" channel for each version of wall_e: create_main_channel
  2. ensure that even though each version of wall_e receives the same text command and messages, only the correct version process those inputs by applying the filter check_text_command_test_environment

Reminders

Reminder system for wall-e that utilizes a background get_messages function that houses a logic that polls the database every 2 seconds in a forever while True loop checking for reminders that are "expired" and therefore need to be sent to the users

RoleCommands

creates a channel where the user can use role-related commands. This was done because at the beginning of each term, users used to incorrectly spam the academic text channel with floods of .iam or .iamn text commands instead of using the bot-commands-and-misc channel as the rules directed.

This necessititated that all the role related commands instead only be invoke-able in the designated bot commands channel bot-commands-and-misc which necessitates that on login, wall_e determine which channel that is, which is what get_bot_general_channel tries to figure out. This also necessitated the creation of send_message_to_user_or_bot_channel which alerts the user in a DM if they used the incorrect channel for their command

text commands
user_name = ctx.author.display_name
user_avatar = ctx.author.display_avatar.url

bot_name = ctx.me.display_name
bot_avatar = ctx.me.display_avatar.url

slash commands
user_name = interaction.user.display_name
user_avatar = interaction.user.display_avatar.url

bot_name = interaction.client.user.display_name
bot_avatar = interaction.client.user.display_avatar.url

keep these guidelines in mind when writing the wikis/READMEs
https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis