A Discord music suggestion bot with slash commands, auto-generated song cards and multi-language support.
Table of Contents
Audiq is a Discord bot built for music communities. It lets users suggest songs via slash commands, generates attractive card previews for each suggestion, and posts them into a configured channel.
The bot uses a centralized dictionary for all user-facing text, making it easy to add new languages and keep command descriptions, replies, and error messages in one place.
Audiq currently supports the following streaming and music content platforms:
- Spotify
- YouTube
- YouTube Music
- SoundCloud
- Global slash command registration for Discord
- Dynamic language selection through environment variables
- Centralized text dictionary (
src/config/dictionary.json)
- Node.js (v18+ recommended)
- npm
-
Clone the repository:
git clone https://github.com/estaniel/discord-music-suggest-bot.git cd discord-music-suggest-bot -
Install dependencies:
npm install
-
Create a Discord application and bot:
- Open the Discord Developer Portal
- Click New Application
- Go to Bot, click Add Bot
- Copy the bot token for the next step
-
Create a
.envfile in the project root:DISCORD_TOKEN=your_bot_token_here CLIENT_ID=your_application_client_id_here LANGUAGE=en_US
-
Invite the bot to your server:
- In the Developer Portal, go to OAuth2 > URL Generator
- Select scopes:
bot,applications.commands - Select bot permissions:
View Channels,Send Messages,Manage Channels(optional for setup checks) - Use the generated URL to add the bot to your server
-
Deploy slash commands globally:
npm run deploy
-
Start the bot:
npm start
If you prefer to run Audiq with Docker, this repository includes a Dockerfile and docker-compose.yml.
- Make sure you have a
.envfile in the project root with the required values. - Build the Docker image:
docker build -t audiq . - Start the container:
docker compose up -d --build
The compose setup mounts ./src/config into the container so src/config/data.json is persisted on the host.
To stop the bot:
docker compose downThe bot stores the configured music channel in src/config/data.json after /setup is run.
Use /setup channel:#your-channel to set the destination channel for suggestions.
If src/config/data.json does not exist, it will be created automatically.
-
/setup channel:#channel- Configures the channel where suggestion cards will be posted.
- Requires the user to have
MANAGE_CHANNELSpermission.
-
/suggest link:<song-url> [vote:true/false]- Suggests a song by URL or link.
- Generates a visual song card and posts it to the configured channel.
- Optional
voteparameter: when set totrue(default), adds a 💎 reaction to the suggestion card for voting/rating.
-
/ping- Replies with the current Discord API latency.
-
/help- Shows the list of available slash commands.
Audiq supports multiple languages through the LANGUAGE environment variable.
Example:
LANGUAGE=es_UY npm startThe default value is en_US. The current dictionary file is located at src/config/dictionary.json and includes:
en_US— Englishes_UY— Uruguayan Spanish
You can add additional locales by extending this JSON file and using the new language code in the environment.
This project is built with:
- discord.js for Discord bot interactions
- dotenv for environment variable management
- node-html-to-image for generating PNG cards
- colorthief for palette extraction
- play-dl for music metadata extraction
- soundcloud-scraper for SoundCloud support
- sharp for image processing dependencies
Special thanks to the open source community for the tools and libraries that make this possible.
Distributed under the MIT License. See LICENSE.txt for more information.
