Skip to content

janimationd/JacuzziBot

Repository files navigation

JacuzziBot

A fun Discord bot with the features described in utils\help.go.

The code is organized as follows:

  • constants/: constant values
  • db/: database-related functionality. Stores persistent data on disk using the bbolt library for later fetching.
  • discord/: logic specific to Discord. This bot might eventually evolve to interact with multiple services/APIs so this is where anything Discord-specific lives. The bot listens and responds to events from the Discord API by utilizing the discordgo library.
  • errors/: custom error types
  • models/: model object types
  • scheduler/: code related to scheduled events
  • utils/: utility functions
  • workflows/: these are the "features" of the bot. After triggers have arrived we execute workflows which contain the "since this happened, do this" logic. Ideally these workflows are agnostic to the models of any specific service or API.

Setup

  1. To install the bot for testing in a new server, you'll need to create a new application in the Discord developer portal:
    1. Name it whatever you want (e.g. JacuzziBot Dev<YourName>).
    2. Under Installation tab:
      1. Uncheck User Install
      2. Under Default Install Settings > Guild install:
        1. Under Scopes, add bot. applications.commands should already be there.
        2. Under Permissions, add:
          1. Add Reactions
          2. Attach Files
          3. Create Polls
          4. Embed Links
          5. Mention Everyone
          6. Read Message History
          7. Send Messages
          8. Send Messages in Threads
          9. View Channels
    3. Under Bot tab:
      1. Press Reset Token, and then copy the new token. Save it somewhere safe (e.g. a password manager).
      2. Under Authorization Workflow:
        1. Enable Server Members Intent
        2. Enable Message Content Intent
        3. Note: it is fine to leave Public Bot enabled as long as you don't share your installation link with anyone. Making a bot publicly discoverable is a different process.
  2. After you've created and configured your test app, create a new Discord server for testing the bot in.
  3. To install the test app in your new server, go to the Installation tab in the developer portal for your app.
    1. Open the Install Link in your browser. This should redirect you to Discord to install your app in a server of your choice.
  4. Install Go >= 1.25.5: https://go.dev/doc/install.
  5. Set your DISCORD_TOKEN environment variable to your app's Discord auth token that you saved earlier.
    1. If you're developing in VS Code you can permanently store your token in the PowerShell terminal like this: setx DISCORD_TOKEN "...". You'll need to restart VS Code before this change takes effect. Verify with echo $env:DISCORD_TOKEN.
  6. go run . to both compile and run the app executable locally.
  7. Once it's running, your client should pick up the commands so you can start using them within about 5 seconds.
  8. Ctrl+C in your terminal to stop the bot program and exit cleanly.

Example local output:

...\JacuzziBot> go run .
2025/12/29 21:19:39 JacuzziBot is now running. Press CTRL-C to exit.
2025/12/29 21:19:39 Discord session opened and waiting for events.
2025/12/29 21:19:51 Incoming message by 123456789012345678 (Sally): Hi everyone!
2025/12/29 21:19:51 User 123456789012345678 (Sally) gained 10.00 points, for a total of 20.00 points.
2025/12/29 21:19:58 JacuzziBot shutting down.
2025/12/29 21:19:58 Discord session closed.

License

This project is licensed open-source under the MIT License.

About

A Discord bot with some sweet features

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages