The RuntimeWarning about 'coroutine was never awaited' is just a warning — the command still works because the coroutine completes before the event loop processes it. But the warning is noisy and misleading. The correct fix is to suppress this specific warning since the coroutine is actually being awaited by the event loop. This reverts to the working original code.
A.B.I.N.A.S.H — Automated Bot Ignoring Nitro And Sending Here
A.B.I.N.A.S.H
Automated Bot
Ignoring Nitro
And Sending
Here
Features
- GIF Emote Support — Send string in Discord channel, bot detects and responds with the appropriate GIF emote
- Admin Panel / Commands — Add, manage, and remove emotes (both GIF and standard)
- Runtime Command Loading — Commands loaded from
commands/subdirectory - Voice Channel Support — Music playback, AI voice support via FFmpegOpusAudio
- Message Reactions — React to members' messages with pre-defined emotes with a percentage chance
- Slash Commands — Full
/ping,/hello,/emoji,/upload-emoji,/list-emojis,/delete-emoji
Quick Start
# Clone and set up
cd /home/ben/Documents/Projects/ia_bot
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env and add your DISCORD_TOKEN
# Run the bot
python main.py
Project Structure
ia_bot/
├── .env.example # Environment variables template
├── .gitignore
├── main.py # Entry point
├── requirements.txt # Dependencies
├── bot.py # Core bot with slash commands
├── README.md
├── commands/ # Slash command modules
│ ├── __init__.py
│ ├── ping.py # /ping, /info
│ ├── hello.py # /hello
│ ├── emoji.py # /emoji, /app-emoji
│ └── admin.py # /list-emojis, /create-emoji, /delete-emoji
├── handlers/ # Event handlers
│ ├── __init__.py
│ ├── gif_emotes.py # GIF emote detection & sending
│ ├── reactions.py # Reaction handler with cooldowns
│ └── voice.py # MusicCog with YTDLSource
├── cogs/ # Discord.py cogs
│ ├── __init__.py
│ └── admin.py # Emoji management cog
└── config/ # Config files (gitignored)
└── bot.json
Commands Reference
Slash Commands
| Command | Description |
|---|---|
/ping |
Check bot latency |
/info |
Show bot info |
/hello <name> |
Greet someone |
/emoji :name: |
Send a custom emoji |
/app-emoji <id> |
Fetch an app-owned emoji |
/list-emojis |
List all custom emojis (admin) |
/create-emoji <name> <file_path> |
Upload an emoji (admin) |
/delete-emoji <name> |
Delete an emoji (admin) |
Text Commands
| Command | Description |
|---|---|
!join <channel> |
Join a voice channel |
!play <url> |
Play a track |
!skip |
Skip current track |
!volume <level> |
Set volume (0-100) |
!pause |
Pause playback |
!resume |
Resume playback |
!stop |
Stop and disconnect |
!queue |
Show the queue |
Configuration
Create a .env file:
DISCORD_TOKEN=your_bot_token_here
COMMAND_PREFIX=!
BOT_NAME=A.B.I.N.A.S.H
GUILD_IDS=123456789,987654321
Dependencies
discord.py==2.3.2discordemojiparser==1.0.0youtube-dl==2021.12.17aiohttp==3.9.1pydantic==2.5.0
License
MIT
Description
Languages
Python
99.5%
Shell
0.5%