davidkirwan / MakerCulture

Discord Bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Makerculture Discord Bot

This Discord bot is built using https://github.com/meew0/discordrb and requires a Discord Bot token. If you don’t yet have a token to put in here, you will need to create a bot account here: https://discordapp.com/developers/applications

Once you have the token place it into a file named discord_token.txt

Deploy on Kubernetes/Openshift

To deploy the bot onto Kubernetes/Openshift, ensure you are first logged into the cluster. Create a project/namespace called makerculture. eg:

oc new-project makerculture

# or
kubectl create namespace makerculture

Then get your discord token, and replace the value XXXX with the token inside the kubernetes/discord_token_configmap.yaml file. Then create the configmap with:

oc apply -f kubernetes/discord_token_configmap.yaml
oc apply -f kubernetes/gab_token_configmap.yaml

# or
kubectl apply -f kubernetes/discord_token_configmap.yaml
kubectl apply -f kubernetes/gab_token_configmap.yaml

Then create the deployment for the bot via:

oc apply -f kubernetes/deployment.yaml

# or
kubectl apply -f kubernetes/deployment.yaml

This should bring up a pod which run the bot.

Local Dev

For local development the following few commands can come in useful.

Build it

To build the docker image use the following:

make build

Run it

To run the bot then, once the discord_token.txt file has been populated, it will be picked up and passed into the container automatically. Simply do the following to run the bot:

make run

About

Discord Bot

License:GNU Lesser General Public License v3.0


Languages

Language:Ruby 87.3%Language:Makefile 7.2%Language:Dockerfile 5.6%