Skip to content

leandcesar/discord-bot

Repository files navigation

discord-bot

Python precommit


Features

Commands

Slash and prefix commands:

  • /afk (+afk): Let others know you're AFK (Away From Keyboard).
  • /alias add (+alias): Create a custom alias for quick reuse.
  • /alias list (+aliases): Display a list of your saved aliases.
  • /alias remove (+unalias): Remove a saved alias.
  • /avatar (+avatar): Display the specified member's avatar(s).
  • /badge (+badge): Change your badge (top role icon) on the server.
  • /banner (+banner): Display the specified member's banner.
  • /color (+color, +cor): Change your color (top role color) on the server.
  • /emote add: Add a custom emote to the server.
  • /emote remove: Remove a custom emote from the server.
  • /emote rename: Rename a custom emote in the server.
  • /fake: Send a message impersonating another user in the current channel.
  • /remind (+remind, +remindme): Set a reminder for yourself or others.
  • /server banner (+serverbanner): Display the guild's banner.
  • /server icon (+servericon, +server): Display the guild's icon.
  • /snipe (+snipe): Restore the last deleted message in the current channel.
  • /sticker add: Add a sticker to the server.
  • /sticker remove: Remove a sticker from the server.
  • /sticker rename: Rename a sticker in the server.
  • /summarize (+summarize, +resumo): Summarize the recent conversation in the chat.
  • /weather (+weather, +w, +clima): Retrieve the current weather for a specified city.

Listeners

These features run automatically, without user commands:

  • Automatically transcribes voice messages (speech-to-text).
  • Automatically downloads tracks from Spotify links.
  • Automatically fixes Twitter/X and Instagram link previews.
  • Automatically evaluates simple math expressions.

Getting Started

Prerequisites

Installing

  1. Clone the repository using Git.
git clone [email protected]:leandcesar/discord-bot.git
  1. Go to directory.
cd discord-bot

Running

  1. Ensure to fill in the necessary environment variables in the .env file.
  2. Build the Docker service for the application.
make build
  1. Check if everything was installed correctly.
make up

Cleaning up

  1. Uninstall all Docker components.
make down

Contributing

Prerequisites

Development

  1. Create a venv and install dependencies with pip.
make install
  1. Create a new branch with a descriptive name.
git checkout -b awesome-branch-name
  1. Implement and add your code changes on this new branch.

Code Style

  1. Perform static code analysis with ruff and mypy.
make lint
  1. Validate code security issues with bandit.
make security
  1. Format the code according to defined standards with black and organize imports with isort.
make format

Contribute

  1. Commit your changes to your local branch using Conventional Commit messages.
git add .
git commit -m 'feat(scope): example message'
  1. Push your changes to the remote GitHub repository.
git push origin awesome-branch-name
  1. Create a Pull Request to the main branch.

Cleaning up

  1. Remove temporary files.
make clean
  1. Uninstall all dependencies.
make uninstall

References

About

Simple Discord bot

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •