Skip to content

toksikk/gidbig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

503 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Gidbig ๐Ÿค–

Gidbig is a Discord bot written in Go โ€” soundboard playback in voice channels, AI chat, weather, time-based games, and more.

โš ๏ธ Fair warning: This project has evolved into an AI agent adventure park and LLM testing ground. Features have been written, reviewed, refactored, and occasionally broken by a rotating cast of AI models. The fact that it's still running is either a testament to Go's resilience or proof that LLMs are, at the very least, okayish at writing code. Possibly both. ๐ŸŽข๐Ÿฆพ

โœจ Features

Core

  • ๐Ÿ“ Ping/Pong โ€” type ping โ†’ bot replies Pong! (and vice versa)
  • ๐Ÿ”Š Soundboard โ€” plays pre-encoded .dca audio files in your voice channel
    • !<prefix> โ€” play a random sound from that collection
    • !<prefix> <soundname> โ€” play a specific sound
    • !list โ€” list all available sound collections
    • !uptime โ€” show bot uptime
    • Files live in audio/ as {prefix}_{soundname}.dca; optional .txt file with the same name adds a description
  • ๐ŸŒ Web UI โ€” browser interface to trigger sounds; requires Discord OAuth2 credentials in config
  • ๐Ÿ“Š /status โ€” slash command showing bot version and uptime

๐Ÿ”Œ Built-in plugins

Plugin What it does
โ˜• coffee Greets users with their preferred morning beverage when they say "moin", "hallo", etc. /setbeverage <emoji> to configure, /brew to trigger manually
๐Ÿ”ฎ eso !eso โ€” generates random esoteric pseudoscience nonsense: tachyonized homeopathic energy cards irradiated with scalar waves to combat the Illuminati mind control agenda
๐ŸŽฎ gamerstatus Rotates the bot's Discord custom status periodically
๐Ÿค– gippity AI chat via /gippity; backed by an LLM, stores conversation history in SQLite; restricted to configured guild IDs
๐Ÿ• leetoclock Daily 13:37 game โ€” first to post in the channel wins; scores by reaction time; posts a scoreboard at end of game
๐ŸงŒ stoll !stoll โ€” Stoll-related commands
๐ŸŒค๏ธ wttrin !wttr <location> / !wttrf <location> โ€” current weather / forecast with an LLM-generated outro

๐Ÿงฉ Dynamic plugins

Gidbig loads .so plugin files from ./plugins/ at startup. A plugin must export Start(*discordgo.Session), PluginName string, and PluginVersion string.

๐Ÿš€ Quickstart

1. Configure

cp config.example.yaml config.yaml

Edit config.yaml:

discord:
    token: "YOUR_DISCORD_BOT_TOKEN"
    owner_id: "YOUR_DISCORD_USER_ID"
    shard_id: 0
    shard_count: 0
web:
    oauth:
        client_id: "YOUR_OAUTH_CLIENT_ID"
        client_secret: "YOUR_OAUTH_CLIENT_SECRET"
        redirect_uri: "YOUR_REDIRECT_URI"
    session_secret: "base64-encoded-32-random-bytes"
    port: 8080
gippity:
    allowed_guilds:
        - "YOUR_DISCORD_GUILD_ID"
    ignored_users: []
dev_mode: true

The web server only starts when web.port, web.oauth.client_id, and web.oauth.client_secret are all set. gippity.allowed_guilds restricts which servers can use /gippity.

2. Add audio files ๐ŸŽต

Drop .dca files into ./audio/ following the naming scheme {prefix}_{soundname}.dca.
Example: airhorn_default.dca โ†’ !airhorn default

3. Build and run ๐Ÿ”จ

make build
./bin/gidbig

๐Ÿ› ๏ธ Build

make build                    # Build binary โ†’ ./bin/gidbig
make test                     # go test -v ./...
make lint                     # golangci-lint run ./...
make release                  # Cross-compile: linux/amd64, arm64, 386, arm and darwin/amd64
make docker                   # Build Docker image
make update                   # go get -u -t ./... && go mod tidy
make build_with_local_plugins # Build with local plugin path replacements (see Makefile)

๐Ÿณ Docker

make docker

# Run with mounted config and audio directory
docker run -it \
  --mount type=bind,source=$(pwd)/config.yaml,target=/gidbig/config.yaml \
  --mount type=bind,source=$(pwd)/audio,target=/gidbig/audio \
  gidbig:$(git describe --tags)

Or use docker-compose.yml in the repo root.

๐Ÿ—บ๏ธ Roadmap

  • ๐Ÿ”€ Migrate all !-prefix commands to Discord slash commands โ€” soundboard, !wttr, !stoll, !eso, etc.
  • ๐Ÿ—‘๏ธ Remove dynamic plugin system โ€” retire the .so loader; consolidate everything into built-in plugins
  • ๐Ÿ—๏ธ Refactor architecture โ€” move from the current event-handler-per-plugin pattern toward a cleaner command/handler abstraction

๐Ÿ“„ License

See LICENSE.

About

Gidbig is a Discord Bot in Go.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors