Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Chetan3010/EarthX

EarthX is a feature-rich Discord music bot built with discord.js v14+, discord-player v6+, and MongoDB. Elevate your server's audio experience with a wide array of music commands, robust performance, intelligent chat management, and comprehensive logging!
https://github.com/Chetan3010/EarthX

discord-bot discord-music-bot

Last synced: 18 days ago
JSON representation

EarthX is a feature-rich Discord music bot built with discord.js v14+, discord-player v6+, and MongoDB. Elevate your server's audio experience with a wide array of music commands, robust performance, intelligent chat management, and comprehensive logging!

Awesome Lists containing this project

README

        

# ๐ŸŽต EarthX Discord Music Bot ( ๐Ÿš… v2 is on the way...)

![EarthX Banner](./assets/images/earthx-banner.png)

EarthX is a feature-rich Discord music bot built with discord.js v14+, discord-player v6+, and MongoDB. Elevate your server's audio experience with a wide array of music commands, robust performance, intelligent chat management, and comprehensive logging!

## ๐Ÿ“‘ Table of Contents
- [โœจ Features](#-features)
- [๐ŸŽฎ Commands](#-commands)
- [๐Ÿงน Auto-Cleanup](#-auto-cleanup)
- [๐Ÿ“Š Logging](#-logging)
- [๐Ÿ–ผ๏ธ Screenshots](#๏ธ-screenshots)
- [๐Ÿš€ Getting Started](#-getting-started)
- [๐Ÿ› ๏ธ Technologies Used](#๏ธ-technologies-used)
- [๐Ÿ”ฎ Future Plans](#-future-plans)

## โœจ Features

- ๐ŸŽถ Advanced music playback with high-quality audio
- ๐Ÿ’ฌ Slash commands with autocomplete for ease of use
- ๐Ÿ–ผ๏ธ Beautiful embed responses for a sleek user interface
- ๐Ÿ’พ MongoDB integration for persistent guild music settings
- ๐Ÿš€ Built on the latest discord.js and discord-player versions
- ๐Ÿงน Automatic message cleanup for a clutter-free chat experience
- ๐Ÿ“Š Comprehensive logging system for easy monitoring and debugging
- ๐Ÿ”ง Easily extendable for future feature additions
- ๐Ÿ—จ๏ธ Prefix will be available soon...
- ๐Ÿ” better error handling soon...
## ๐ŸŽฎ Commands

EarthX offers a variety of music-related commands to enhance your Discord server's audio experience:

- `/play` - Start playing a song or playlist
- `/pause-resume` - Pause/resume the current track
- `/skip` - Skip to the next song in the queue
- `/queue` - View the current music queue
- `/nowplaying` - Display information about the current track
- `/shuffle` - Randomize the order of songs in the queue
- `/247` - Stays on voice channel 24/7
- `/save` - Send you the current track into dm
- `/autoplay` - Plays similar songs on empty queue

...and many more!

## ๐Ÿงน Auto-Cleanup

EarthX keeps your music channel clean and organized with its intelligent auto-cleanup feature:

- ๐Ÿšซ Automatically removes outdated music status messages
- ๐ŸŽต Cleans up "Now Playing" messages when a song ends
- ๐Ÿ“œ Removes queue messages that are no longer relevant
- ๐Ÿ”‡ Deletes pause/resume notifications after a short time
- ๐Ÿ’ฌ Keeps the chat focused on the current music experience

This feature ensures that your music channel remains clutter-free and easy to navigate, enhancing the overall user experience.

## ๐Ÿ“Š Logging

EarthX comes with a powerful logging system that provides detailed insights into the bot's operations:

- ๐Ÿ“ Logs all commands executed by users
- ๐ŸŽต Tracks music playback events (play, pause, skip, etc.)
- ๐Ÿ” Records error messages for easy debugging
- ๐Ÿ“ˆ Offers insights into bot performance and usage statistics

The logging system outputs clean, well-formatted logs to the console, making it easy for bot administrators to monitor activity and troubleshoot issues.

![Logging Screenshot](./assets/images/earthx-logs.png)

## ๐Ÿ–ผ๏ธ Screenshots


Stats Command
Earthx
Now-playing Command
Skip-to Command
Autoplay Command
Queue Command
Save Command
Saved Song

## ๐Ÿš€ Getting Started

To add EarthX to your Discord server:

1. [Click here to invite EarthX to your server](https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=YOUR_PERMISSIONS&scope=bot%20applications.commands)(available soon)
2. Grant the necessary permissions
3. Use `/help` to view available commands

For developers looking to host their own instance:

1. Clone the repository:
```bash
git clone https://github.com/Chetan3010/EarthX.git
```
2. Install dependencies:
```bash
npm install
```
3. Install FFmpeg:
- **For Windows**: Download the FFmpeg build from [FFmpeg's official site](https://ffmpeg.org/download.html), extract it, and add the `bin` folder to your system's PATH.
- **For macOS**: Use Homebrew to install FFmpeg:
```bash
brew install ffmpeg
```
- **For Linux**: Use your package manager to install FFmpeg. For example, on Ubuntu:
```bash
sudo apt update
sudo apt install ffmpeg
```
4. Set up your `.example.env` file with your secrets and rename it to `.env`.

#### Prerequisite

- Discord bot/client token
- Discord bot/client id
- Spotify Client Id
- Spotify Client Secret
- MongoDB Connection String
- Discord bot owner/developer discord user id
- Community guild id
- Community guild channel id

5. Start the bot:
```bash
npm start
```

##### Note :-
Emojis in the embed will not work unless your bot has access to them. You have two options:
1. Upload all emojis to the Discord Developer Portal's bot emojis API. Replace markdown with `config/emojis.js` respective emojis.
2. Alternatively, you can upload the emojis to a server and replace the IDs in the `config/emojis.js` file with the corresponding emoji IDs. Ensure that your bot is in the same server as the emojis you are using.

Checkout emojis folder to get all your emojis.

## ๐Ÿ› ๏ธ Technologies Used

- [discord.js](https://discord.js.org/) v14 - A powerful JavaScript library for interacting with the Discord API
- [discord-player](https://discord-player.js.org/) v6 - A robust framework for creating music bots
- [MongoDB](https://www.mongodb.com/) - A flexible NoSQL database for storing guild settings
- [Node.js](https://nodejs.org/) - JavaScript runtime built on Chrome's V8 JavaScript engine

## ๐Ÿ”ฎ Future Plans

I'm working to improve EarthX and expand its capabilities. Here's what's on the horizon:

- ๐Ÿ›ก๏ธ Moderation commands for server management
- ๐ŸŽ‰ Fun and utility commands to entertain and assist users
- ๐Ÿค– Some AI stuff

---


Made with โค๏ธ by Chetan Kale