Skip to content
Sam Low edited this page Nov 17, 2020 · 6 revisions

Welcome to the SCE-discord-bot wiki!

How the repository is structured

This repository consists of two main folders, them being api and src. These two folders, along with all of the files, make up what is necessary to run the bot in the Discord server.

The api Folder

This folder contains models and resolvers, and these are used in conjunction with GraphQL in the form of a database. Models are what's used as a shell for two planned commands, Points and Threads, storing message IDs and arbitrary points gained, for example. The resolvers can call the stored values, or it may change them if need be.

The src Folder

This folder contains most of the rest of the information in the bot. Running down the folder, it is divided into the following subfolders:

  • APIFunctions actually defines how the resolvers are called and how they are used at a specific moment in time.
  • commands contains the framework for the commands in the server, that is, what exactly happens when a user executes one.
  • handlers contains information related to the bot's usage. CooldownManager specifies how long a user must wait before using another bot command, MessageHandler dictates how the bot will respond to a user-executed command, NonPrefixHandler for when a user executes a command without the normal keyword s!, and VoiceChannelChangeHandler for when a renamed voice channel must rename back to what it was named before.
  • nonPrefixCommands are commands that are triggered by a message that does not contain the normal keyword s!, which will be used in Points and Threads.
  • util contains the utility component of the commands that are used.
Clone this wiki locally