Yet Another Shitly Made Discord Bot — music, AI, Formula 1 and a healthy dose of nonsense.
| Area | Commands |
|---|---|
| 🎵 Music | /play, /queue, /skip, /nowplaying, /leave — YouTube playback powered by yt-dlp + FFmpeg |
| 🧠 AI | /ai — Google Gemini chat (free key from AI Studio) |
| 🏎️ Formula 1 | /f1_standings, /f1_race_result, /f1_qualifying, /f1_calendar |
| 🎉 Fun | /cowsay, /archbtw, /complain, /finger, /heart, /howmanytimes, /howmanybutton, /nothing, /nvidia, /rickroll_me |
| 🛠️ Utility | /say, /webhook, /dm_or_not, /hide_conversation |
| 👑 Admin | /purge, /shutdown, /change_status, /create_webhook, /delete_webhook — gated by the admins list in config.yaml |
| ℹ️ Other | /ping, /source, /license |
Errors are caught globally by a dedicated error handler cog, so a failing command won't crash the bot.
You must have following installed on your computer for this bot to work correctly:
- A Discord bot token from Discord Developer Program.
- Linux, macOS, or Windows operating system.
- Python 3.14
- uv for managing libraries
- Git for cloning the repository
- FFmpeg for
/playcommand to work correctly (ensure it's in your PATH).
- Download all files from this repository with
git clone https://github.com/hakergeniusz/discord-bot.git. - Open the folder with
cd discord-bot. - Create and fill up
.envandconfig.yamlfile. - Run
uv syncto install all required libraries.
.envvalues:DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN GEMINI_API_KEY=GOOGLE_AI_STUDIO_KEY
DISCORD_BOT_TOKEN: Your Discord bot token from Discord Developer Program.GEMINI_API_KEY: Your Google AI Studio API key (obtainable for free on aistudio.google.com).
Example
config.yamlfile:prefix: "!" admins: - 123456789 - 987654321
prefix: The prefix for bot commands. Default is!admins: List for Discord user IDs that have access to admin commands.
Execute the following command:
uv run botEvery push to main/latest builds a multi-arch image (linux/amd64, linux/arm64, linux/riscv64) and publishes it to GHCR. Run it with:
docker run -d --name discord-bot \
--env-file .env \
-v ./config.yaml:/app/config.yaml:ro \
ghcr.io/hakergeniusz/discord-bot:latestThe image runs the bot as an unprivileged user and reads its configuration from /app/config.yaml (mount yours as shown above); the .env values can equivalently be passed with -e DISCORD_BOT_TOKEN=... -e GEMINI_API_KEY=....
uv sync --all-extras --dev # install runtime + dev dependencies
uv run pytest # run the test suite
uv run ruff check . # lint
uv run ruff format --check . # formatting checkType checking is done with basedpyright in standard mode (see pyproject.toml).
- CI (
.github/workflows/tests.yml): Ruff lint + format check and the pytest suite on Linux, Windows and macOS. - Container (
.github/workflows/container.yml): podman builds foramd64/arm64/riscv64merged into a multi-arch manifest on GHCR. - Failure reporting: when a push to
main/latestends red, the workflows open (or update) an issue titled 🔴 CI failing on<branch>with a link to the failing run, and automatically close it once CI is green again.
All credits for are in CREDITS file.
This software is licensed under the BSD 3-Clause License.
You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at: https://opensource.org/license/bsd-3-clause
Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE file for the specific language governing permissions and limitations under the Licence.