An open API service indexing awesome lists of open source software.

https://github.com/davidkirwan/makerculture

Discord Bot
https://github.com/davidkirwan/makerculture

discord discord-bot discord-rb docker kubernetes maker openshift ruby

Last synced: 4 months ago
JSON representation

Discord Bot

Awesome Lists containing this project

README

        

== 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
----