No description
Find a file
2026-02-27 11:31:19 +00:00
charts/durpot update chart 2023-05-27 16:55:03 -05:00
handlers fix linter 2023-06-06 21:15:57 -04:00
model added !unraid and restructure 2023-05-27 16:32:59 -05:00
.dockerignore test action 2022-05-29 10:40:07 -05:00
.gitignore fix lint 2023-05-27 16:43:22 -05:00
.gitlab-ci.yml Update file .gitlab-ci.yml 2026-02-27 11:31:19 +00:00
Dockerfile update dockerfile 2023-05-27 11:52:47 -05:00
go.mod tidy 2023-05-27 17:00:53 -05:00
go.sum tidy 2023-05-27 17:00:53 -05:00
main.go updates 2023-06-06 19:13:41 -04:00
README.md updates 2023-03-29 06:25:45 -05:00
sonar-project.properties update 2023-05-27 12:19:18 -05:00

This is a simple Go program that uses the DiscordGo library and some APIs to handle some commands from users in a Discord server. It responds to certain messages prefixed by the BotPrefix variable, which can be customized in the .env file. It uses the godotenv library to read these values from the environment.

The main file (main.go) sets up a Discord bot using a token and listens to incoming messages. It then checks for certain messages and sends a response depending on the command.

The program uses the following APIs:

Yo Mama API
Dad Joke API
Jingle Bells API
Ron Swanson Quotes API

Dependencies

This program has several dependencies, which are managed using Go modules. The dependencies are:

github.com/bwmarrin/discordgo: a Discord API library for Go
github.com/joho/godotenv: a library for loading environment variables from a file
github.com/sashabaranov/go-openai: a library for accessing the OpenAI GPT-3 API

These dependencies are automatically fetched and installed when the program is built or run. How to run

To run the program, you need to have a valid Discord bot token. You can obtain this by creating a new bot application in the Discord Developer Portal. Once you have a token, you need to create a .env file in the same directory as the program, with the following variables:

TOKEN: the Discord bot token
BOTPREFIX: the prefix for bot commands (e.g. "!")
ChannelID: the ID of the channel where you want the bot to listen
OPENAI_API_KEY: an API key for the OpenAI GPT-3 API (optional)

Once you have set up the .env file, you can run the program by executing go run main.go in the terminal.