https://github.com/itzmaniss/mist-bot
A versatile Discord bot for Minecraft server management, music playback, and community games. Features server controls, YouTube music streaming, interactive counting games, and moderation tools.
https://github.com/itzmaniss/mist-bot
bot counting-bot discord music-bot-discord python
Last synced: 9 months ago
JSON representation
A versatile Discord bot for Minecraft server management, music playback, and community games. Features server controls, YouTube music streaming, interactive counting games, and moderation tools.
- Host: GitHub
- URL: https://github.com/itzmaniss/mist-bot
- Owner: itzmaniss
- License: mit
- Created: 2024-05-29T13:31:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-06T04:34:55.000Z (about 1 year ago)
- Last Synced: 2025-10-14T11:35:26.554Z (9 months ago)
- Topics: bot, counting-bot, discord, music-bot-discord, python
- Language: Python
- Homepage:
- Size: 6.54 MB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# Discord Bot
This is a multi-purpose Discord bot built with Python and the discord.py library. It includes several features such as server management for Minecraft servers, music playback, and a smoking feature.
## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Configuration](#configuration)
- [Usage](#usage)
- [Minecraft Server Management](#minecraft-server-management)
- [Music Playback](#music-playback)
- [Smoking Feature](#smoking-feature)
- [File Structure](#file-structure)
- [Contributing](#contributing)
- [License](#license)
## Features
- **Minecraft Server Management**: Start and stop Minecraft servers using the API of a server management panel. Includes safeguards to prevent abuse and ensure only authorized users can manage the servers.
- **Music Playback**: Play music in a voice channel using YouTube as the source. Supports queuing songs, skipping tracks, pausing/resuming, looping, and more. Also fetches lyrics for the currently playing song.
- **Smoking Feature**: A fun feature that allows users with a specific role to "wake up" other users by pinging them repeatedly. Includes checks to ensure it's used in the appropriate channels and by authorized users.
## Installation
### Prerequisites
- Python 3.7+
- discord.py
- yt-dlp
- aiohttp
- toml
- ffmpeg
- opus
### Setup
1. Clone the repository:
```
git clone https://github.com/yourusername/discord-bot.git
```
2. Install the required dependencies:
```
pip install -r requirements.txt
```
3. Make sure FFMpeg, yt-dlp and opus are installed
4. Set up the necessary configuration files (see [Configuration](#configuration)).
5. Run the bot:
```
python main.py
```
## Configuration
The bot's configuration is stored in a `config.toml` file. An example configuration file is provided in `config/config.toml`. You'll need to edit this file to include your bot token, server management API details, allowed users and channels, and more.
## Usage
### Minecraft Server Management
- `/start `: Start a Minecraft server. Replace `` with the name of the server (e.g., "vanilla", "ATM9").
- `/stop `: Stop a Minecraft server.
### Music Playback
- `/join`: Join a voice channel.The bot will join the channel the user is currently in.
- `/play `: Play a song from YouTube. `` can be a search term or a YouTube URL.
- `/pause` or `/resume`: Pause or resume playback.
- `/skip`: Skip the currently playing song.
- `/queue` or `/q`: Show the current song queue.
- `/clear`: Clear the song queue.
- `/remove `: Remove a song from the queue at the specified position.
- `/volume ` or `/vol `: Set the volume to a value between 0 and 100.
- `/loop`: Toggle loop mode on or off.
- `/np`, `/now`, or `/playing`: Show the currently playing song.
- `/seek `: Seek to a specific position in the current song. `` can be in the format "MM:SS" or a number of seconds.
- `/replay` or `/restart`: Replay the current song from the beginning.
- `/lyrics [song]` or `/ly [song]`: Fetch the lyrics for the specified song. If no song is specified, the lyrics for the currently playing song will be fetched.
### Smoking Feature
- `/wakey `: "Wake up" a user by pinging them repeatedly. Only available to users with the "smoker" role and usable in designated channels.
- `/woken`: Stop the pinging for a user.The pinging for the user who used the command will be stopped.
## File Structure
- `main.py`: The main entry point of the bot.
- `config/`: Contains configuration files.
- `config.py`: Loads the configuration from `config.toml` and provides it to the rest of the application.
- `config.toml`: The main configuration file.
- `core/`: Contains core functionality of the bot.
- `bot.py`: Defines the main `DiscordBot` class.
- `server_manager.py`: Handles interactions with the Minecraft server management API.
- `features/`: Contains the different features of the bot.
- `base.py`: Defines a base `BotFeature` class that all features inherit from.
- `minecraft.py`: Implements the Minecraft server management feature.
- `music.py`: Implements the music playback feature.
- `smoking.py`: Implements the smoking feature.
- `utils/`: Contains utility functions and classes.
- `helpers.py`: Various helper functions used throughout the bot.
- `logger.py`: A simple logging utility.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is open source and available under the [MIT License](LICENSE).