Skip to content

A secure, Dockerized Discord bot written in Go, featuring command handling, environment variable support, and a Go server for status monitoring and alerts.

License

Notifications You must be signed in to change notification settings

PunGrumpy/discord-bot-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Bot in Go

This project is a Discord bot written in Go. It uses the discordgo package and includes a variety of features, such as command handling, environment variable configuration, Docker deployment, and a server for status monitoring and alerts.

Features

  • Command handling: The bot is capable of handling various commands and responds accordingly.
  • Environment variable configuration: Both .env file and system environment variables are supported for configuration.
  • Docker deployment: The bot is containerized using Docker, which makes it easy to deploy anywhere.
  • Server for status monitoring and alerts: A server written in Go monitors the status of the bot and sends alerts when the bot is down or encounters issues.

Setup and Running

  1. Clone this repository.
git clone https://github.com/PunGrumpy/discord-bot-go.git
cd discord-bot-go
  1. Create a .env file in the root of the project and fill in your Discord bot token and guild id:
BOT_TOKEN=your_bot_token
  1. Create a server.crt and server.key file in the root of the project for HTTPS support. You can use the following command to generate a self-signed certificate:
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes # 1 year
  1. Build the Docker image and start the services:
docker-compose up -d
# or
docker compose up -d

The bot should now be running in your Discord server, and the status monitoring server should be available at http://localhost:8080.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A secure, Dockerized Discord bot written in Go, featuring command handling, environment variable support, and a Go server for status monitoring and alerts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published