A Discord bot designed to join a voice channel that a user has joined and play a specific sound. This bot enhances server interactions by providing a fun and interactive audio experience for users.
If you have questions, suggestions, or just want to chat with us, join our Discord guild:
Click on the image below to watch a demonstration of the Discord bot on YouTube:
- Development & Configuration
- Features
- Setup & Installation
- Commands
- Events
- Dependencies
- Debugging with VS Code
- Contribution & Feedback
- License
- Contact
- TypeScript: The bot is written in TypeScript, offering strong typing and OOP features.
- ESLint: The code is linted using ESLint to ensure code quality and consistency.
- VS Code: For developers using Visual Studio Code, there are specific configurations provided for a seamless development experience.
- Join & Play: The bot automatically joins a voice channel when a user joins and plays a designated sound.
- Interactive Commands: Engage users with commands to control the bot's behavior.
-
Clone the Repository
git clone https://github.com/jndgoncalves/SuperDoraemon-discord-sound-bot
-
Navigate to the Directory
cd SuperDoraemon-discord-sound-bot
-
Install Dependencies
npm install
-
Setup Environment Variables Rename
.env.example
to.env
and fill in the required variables, such as your Discord token and any other necessary configurations. -
Run the Bot
docker-compose up
!ping
: Checks the bot's responsiveness.!play
: Outputs "playing a sound..." in the text channel. (Note: This command was created as a test before implementing the event-based sound playing feature.)
!server
: Provides server information (name and total members).!user
: Provides information about the invoking user (tag and unique ID).
- ready: Initializes the bot and logs a message to the console.
- interactionCreate: Processes user interactions with server commands.
- joinVoiceChannel: Handles users joining voice channels, triggering bot actions.
- Discord.js: Interact with the Discord API.
- @discordjs/voice: Handle voice connections in Discord.js.
- dotenv: Load environment variables from
.env
. - ts-node: TypeScript execution for Node.js.
- ffmpeg: Handle multimedia data for audio playback in voice channels.
- @typescript-eslint/eslint-plugin and @typescript-eslint/parser: ESLint support for TypeScript.
- eslint: Lint ECMAScript/JavaScript code.
- nodemon: Monitor source changes and restart the server.
- typescript: Static types for JavaScript development.
-
Update docker-compose.yml: Modify for debugging.
-
Build and Start the Container:
docker-compose up
-
Debug using VS Code: Attach VS Code to the running Node.js process inside the container.
Contributions are welcome! Fork the repository and submit a pull request for enhancements or fixes. For feedback or issues, use the GitHub issues section.
This project is licensed under the MIT License.
For inquiries or collaboration opportunities, reach out via GitHub issues or your preferred contact method.