Skip to content

Dahl99/discordbot

Repository files navigation

discordbot

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

There are many great Discord bots out there, but I wanted to develop my own. I wanted the freedom of being able to easily add my own commands and tailor it to my own needs. After thinking a bit about which language to use, I decided on developing it in Go. I decided on Go after my newfound love for the programming language after the cloud technologies course I had during my bachelor in programming. Of course this Discord bot may not cover all of your own needs, but you're more than welcome to fork this repo and change it how you like.

Built With

This discord bot is built with:

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

In order to run this project you will need the following:

  • Go 1.21 installed
  • Docker and Docker Compose v2 installed
  • Discord account
  • Google developer account

Installation

  1. Go to the Discord developer portal

  2. Create a new application

  3. Add a bot user to the application

  4. Get the token for the bot

  5. Clone the repository

    git clone https://github.com/Dahl99/discordbot.git
  6. Install dependencies

    go mod download all
  7. Create the environment variables file .env from the .env.example file in the root folder and add the following:

    APP_ENVIRONMENT=LOCAL or TEST or PRODUCTION
    BOT_PREFIX="Your prefix for bot commands"
    BOT_STATUS="Your bot status message"
    BOT_GUILD_JOIN_MESSAGE="Your bot guild join message"
    DISCORD_TOKEN=Your discord token
    YOUTUBE_API_KEY=Your youtube api key

Usage

To run the discord bot from root directory, execute the following command

go run cmd/discordbot/main.go

Or to start the docker containers using docker compose V2

docker compose up -d

Contact

Project Link: https://github.com/Dahl99/discordbot

About

A personal discord bot developed in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published