Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Latest commit

 

History

History
90 lines (61 loc) · 3.5 KB

README.md

File metadata and controls

90 lines (61 loc) · 3.5 KB

Otter-Buddy

Tests

Discord bot to help you to prepare for your interviews.

Features

  1. Setup Interview match activity, where members receive a random buddy to practice with.
  2. Give Discord role when reacted to messages
  3. Notifications via email

Usage

Dependencies

Now all dependencies need to be installed. otter-buddy uses Poetry to manage its python dependencies. After installing Poetry navigate to the root of the repo and run

⚠️ otter-buddy requires Python 3.8 and Poetry 1.1.6!

Setup

# Install dependencies
poetry install

Environment Variables

Fill in appropriate variables in new "environment" (.env) file.

  • BOT_TOKEN: the Discord Bot Token for your bot.
  • LOGGING_CHANNEL: the Discord Channel ID of a Discord Channel where you want error messages sent to.
  • MONGO_URI: address of the MongoDB instance to be used, could be local or Cluster from Atlas.
  • WELCOME_MESSAGES: message ids separated by , that give OTTER_ROLE when reacted to.
  • MAIL_USER: email to be used for notifications.
  • MAIL_PASS: credentials to access in the email.
  • OTTER_ADMIN: Discord role that give access to admin role based commands.
  • OTTER_MODERATOR: Discord role that give access to moderator role based commands.
  • OTTER_ROLE: Discord role to give when reacted to WELCOME_MESSAGES.

⚠️ Email is configured only for Gmail turning ON Allow less secure apps

Constants

Modify the constants (constants file) setting properly for you.

  • SERVER_INVITE: Discord server where the users can look for help.
  • BOT_INVITE: link to invite your bot to them servers.
  • GITHUB_LINK: GitHub repository where the users can suggest features or report bugs.
  • LOGS_DIR: folder where the logs are going to be saved.
  • LOG_FILE_PATH: use the filename otter-buddy.log by default to save the logs.
  • ALL_DIRS: this can be omitted, only is used to know which folders needs to create.
  • PREFIX: character or string to be used as prefix for the bot.
  • BRAND_COLOR: color used in the embedded messages.

Run

# Run the bot
poetry run python -m otter_buddy

Dockerize

If you want to use Docker, you need to take care of few extra steps.

Dependencies

Be sure to have this two technologies installed:

Environment Variables

Add these variables in "environment" (.env) file.

  • MONGO_ROOT_USERNAME: username to be created as root user with given credentials to manage MongoDB.
  • MONGO_ROOT_PASSWORD: strong password to be used as credentials for MONGO_ROOT_USERNAME.
  • MONGO_USERNAME: user that manage the connections of the application into the database.
  • MONGO_PASSWORD: credentials configured to the user of the application.

⚠️ You can omit MONGO_URI because will be configured during the creation.

Run

# Build and run the bot
docker-compose up -d