Git Product home page Git Product logo

bendobot's Introduction

BendoBot

Go Report Card

This is a rewrite in Go of my old Discord bot, which was written in Java. I wrote the old version in 11th grade together with @Yurifag based on a series of Youtube tutorials by @zekroTJA. After some time it turned into an unmaintainable mess and I took it offline. This time I try to avoid that.

Installation

Classic

# Clone the repo
git clone https://github.com/Bendodroid/BendoBot.git && cd BendoBot
# Compile
go build
# Run
./BendoBot

To work, the bot needs a config.json in your current working directory. An example is provided in this repo. You need your own Discord API token which you can get via the Discord Developer Portal.

Docker

Step 1: Obtaining the Docker Image

Currently there's no Docker image available via Docker Hub or the like, so you need to build one yourself:

# Clone the repo
git clone https://github.com/Bendodroid/BendoBot.git && cd BendoBot
# Build the Docker image and name it bendobot
docker image build -t bendobot .

Step 2: Creating a Docker Volume for the Configuration File

In this step you create a Docker volume with a configuration file inside it. This volume will then be mounted inside the Docker container. This way we can easily use a configuration file inside a Docker container.

First create the Docker volume:

# Create a Docker volume named BendoBotData.
docker volume create BendoBotData

Get the mountpoint of the Docker volume:

docker volume inspect BendoBotData | grep Mountpoint

This command should give you the path of the mountpoint.

Now create a config.json as described above and move it into the Docker volume using the mountpoint you just obtained.

Here's an example of how that can be done:

# Copy the example config.json (config.example.json) to config.json
cp config.example.json config.json
# Edit the config.json to replace the placeholder values
vim config.json
# Move the config.json into the Docker volume
mv config.json /path/of/Docker/volume/mountpoint

Step 3: Running the Bot

Now you can easily run the Bot by using the following command:

docker run -d --rm --name BendoBot --mount source=BendoBotData,target=/app/config_volume bendobot

You can get BendoBots output using this command:

docker container logs BendoBot

And you can stop the container and bot using this command:

docker container stop BendoBot

License

Will be chosen when version 0.1 is released.

bendobot's People

Contributors

bendodroid avatar june128 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.