Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JedHazaymeh authored Dec 5, 2023
1 parent 17cd03e commit 2d357e9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ For help with using the module, check out the [documentation](https://interactio

> `main.py:`
- A custom, dynamic extension (command) loader. Write an extension in the `extensions/` directory, and it will automatically be loaded when the bot boots.
- Utilizes the logging library and implements an easy to use custom logger and formatter. All you need to do is call `initLogger("script_name")` in a module, and log configuration is taken care of for you.
- Alongside the custom logging utility, exception handling is present and proper debug levels exist. You can configure the level to your liking in `config.py`.

> `src/logutil.py:`
- Functions here exist to aid the user in simplifying `logging` configuration. Here, all log messages go to standard output.
- A custom formatter also applies based on what level logging you desire, whereas DEBUG produces verbose output and is tailored to aid in debugging, showing which module the message is originating from and, in most cases, which line number. Loggging levels are categorized by color.
> `extensions/`:
- This directory is home to the custom extensions (known as cogs in `discord.py`, or command groups) that are loaded when the bot is started. Extensions are classes that encapsulate command logic and can be dynamically loaded/unloaded.

> `config.py:`
- This module houses the bot configuration. The values are loaded from environment variables, so you can set them in your shell or in a `.env` file.
Expand All @@ -32,12 +29,11 @@ For help with using the module, check out the [documentation](https://interactio
> - Copy the generated URL at the bottom of the page to invite it to desired servers
> 4. Make a new file called `.env` inside the repo folder and paste the below code block in the file
> ```
> TOKEN="[paste Discord bot token here]"
> DEV_GUILD=[paste your bot testing server ID here]
> TOKEN=<paste Discord bot token here>
> ```
> 5. Run `pip install -r requirements.txt` to install packages. You'll need Python 3.10 or later
> 6. Once that's done, run the bot by executing `python3 main.py` in the terminal
*If you aren't sure how to obtain your server ID, check out [this article](https://www.alphr.com/discord-find-server-id/)*
*If you get errors related to missing token environment variables, run `source .env`*
*If you get errors related to missing token environment variables, run `source .env`*

0 comments on commit 2d357e9

Please sign in to comment.