A discord bot that helps manage reminders
  • Go 90%
  • Jinja 7.4%
  • Dockerfile 1.8%
  • Shell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-26 18:54:37 -04:00
cmd/saltbot Adapt to new generic git url 2026-09-26 18:54:37 -04:00
k8s Uptake common gitlab templates 2025-02-21 08:11:58 -05:00
pkg Adapt to new generic git url 2026-09-26 18:54:37 -04:00
.gitignore Add test runner script to print out coverage 2023-07-28 12:56:52 -04:00
.gitlab-ci.yml Uptake common gitlab templates 2025-02-21 08:11:58 -05:00
Dockerfile Cache go mod dependencies 2026-09-08 20:48:27 -04:00
go.mod Adapt to new generic git url 2026-09-26 18:54:37 -04:00
go.sum Adapt to new generic git url 2026-09-26 18:54:37 -04:00
LICENSE Initial commit 2019-07-12 17:05:28 -04:00
README.md Rebuild saltbot completely in golang 2023-07-08 12:54:07 -04:00
run_tests.sh Clean up unused code 2026-09-01 17:33:46 -04:00

SaltBot2.0

This is a fun discord bot written in JavaScript Python Go (yes this is the 3rd time I've re-implemented this bot). To see a list of commands, you can either look at the handler.go file or type !help in a channel that SaltBot is listening to. To add SaltBot to a server, contact me at davidgreeson13@gmail.com for an OAuth2 url.

Saltbot Prerequisites

To run Saltbot, you need to have 3 tokens:

  • BOT_TOKEN - A discord developer bot token for connecting to the discord servers.
  • YOUTUBE_AUTH - A YouTube API token for retrieving YouTube videos.
  • GIPHY_AUTH - A Giphy API token for retrieving Giphy gifs.

Create each of those tokens, and then create an auth file called auth.env like below but with your tokens:

BOT_TOKEN=<YOUR-BOT-TOKEN>
GIPHY_AUTH=<YOUR-GIPHY-AUTH>
YOUTUBE_AUTH=<YOUR-YOUTUBE-AUTH>

Running SaltBot

Run saltbot directly with the golang interpreter:

go run saltbot.go

Saltbot will first attempt to reach out to a kubernetes server using a kubernetes Service Account. If it can't, then it will attemp to use ~/.kube/config.

Running SaltBot in a Kubernetes Cluster

I published SaltBot on a public docker hub repo at highsaltlevels/saltbot. If you would like to deploy this into a kubernetes cluster, you're free to use the namespace and deployment files in the k8s folder.

  1. Replace the placeholders with actual credentials
sed -i s/__BOT_TOKEN__/<YOUR-BOT-TOKEN>/g k8s/deployment.yaml
sed -i s/__GIPHY_AUTH__/<YOUR-GIPHY-AUTH>/g k8s/deployment.yaml
sed -i s/__YOUTUBE_AUTH__/<YOUR-YOUTUBE-AUTH>/g k8s/deployment.yaml
  1. (Optional) Create a saltbot Namespace
kubectl create -f k8s/namespace.yaml
  1. (Optional) Log into Dockerhub to Avoid Anonymous Pull Rate Limiting
docker login -u <username> -p <password>
kubectl -n saltbot create secret generic regcred --from-file=.dockerconfigjson=/path/to/.docker/config.json --type=kubernetes.io/dockerconfigjson
  1. Deploy Saltbot
kubectl -n saltbot apply -f k8s/deployment.yaml