https://github.com/levy-y/docker-discord-bot
A simple dockerfile and instructions on how to create a container for a discord bot
https://github.com/levy-y/docker-discord-bot
discord-bot docker docker-template
Last synced: about 1 month ago
JSON representation
A simple dockerfile and instructions on how to create a container for a discord bot
- Host: GitHub
- URL: https://github.com/levy-y/docker-discord-bot
- Owner: Levy-Y
- Created: 2023-04-22T09:34:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-11T13:21:43.000Z (about 2 years ago)
- Last Synced: 2025-01-08T23:59:31.621Z (over 1 year ago)
- Topics: discord-bot, docker, docker-template
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-discord-bot
This repository contains the required files to build a Docker container, which is running a python discord bot.
## Getting Started
To get started with this bot, you will need to have Docker installed on your system. You can download Docker [here](https://www.docker.com/products/docker-desktop/).
## Installation
Follow these steps to run the bot:
1. Clone the repository using the following command:
```bash
git clone https://github.com/Levy-Y/docker-discord-bot
```
2. Navigate to the directory using the following command:
```bash
cd docker-discord-bot
```
3. Open the **docker-compose.yml** file and replace *YOURTOKEN* with your Discord bot token.
4. Run the following command to build the Docker image:
```bash
docker build ./
```
6. To start the container enter the following command:
```bash
docker-compose up -d
```
*(Note: this will start the container in detached mode)*
## Option B:
You can also just run the docker-compose_NO-BUILD.yml file after cloning this repository, like:
```bash
docker-compose -f docker-compose_NO-BUILD.yml up -d
```
*(Note: you'll need the bot.py otherwise the command will exit)*
## Usage
The bot will now be running and ready to respond to commands. You can add the bot to your Discord server by creating a new application and adding a bot to it. Follow the steps outlined in the [Discord Developer Portal](https://discord.com/developers/applications) to create a new application and add a bot to it.