Skip to content

FlorisTH/Discord-AI-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoonerAI 🤖

A lightweight, compiled Rust Discord Bot designed for the "Gaming Gooners" server.

Features:

  • Interactive Control Panel: A permanent Embed in a dedicated channel with buttons that open Modals for input.
  • Custom AI Endpoint: Designed to connect to self-hosted AI proxies like LiteLLM or local models to process chat requests. Fully compatible with any standard OpenAI API endpoint (just provide your URL and API key).
  • Isolated Per-User Memory: Embedded SQLite tracks each user's conversation history individually. No cross-talk!
  • Quote Database: Users can submit and randomly fetch server quotes natively via embedded database tables.

Pterodactyl Installation (Rust Generic Egg)

This bot is designed to compile and run seamlessly inside a Pterodactyl Panel using the basic "rust generic" egg.

  1. Create a new server on your Pterodactyl Panel and select the Rust (Generic) egg.
  2. Upload these project files (the src/ folder, Cargo.toml, .env.example, etc.) directly into the root directory of the server.
  3. Rename .env.example to .env (or create a new .env file).
  4. Fill out the .env file with your sensitive details:
    • DISCORD_TOKEN: Your bot token.
    • LITELLM_URL: The URL to your chat completions endpoint.
    • LITELLM_API_KEY: Your LiteLLM API key.
    • GENERAL_CHANNEL_ID: The channel ID where the bot should send the responses.
  5. Hit Start in the Pterodactyl console.
  6. Cargo will automatically download the required crates and compile the bot (this might take a few minutes on the first boot). Once finished, it will say "Logged in as...".

Discord Setup & Bot Permissions

When inviting the bot to your server, make sure it has the application.commands scope enabled.

Required Bot Permissions:

  • View Channels
  • Send Messages
  • Embed Links (Required for the Control Panel and AI responses)
  • Read Message History
  1. Create a dedicated channel in your server (e.g., #ai-terminal).
  2. Run the command /setup_panel inside that channel (Note: You must have Administrator permissions to run this).
  3. The bot will drop a permanent control panel embed with interactive buttons!

Database

The bot uses rusqlite with the bundled feature, meaning the SQLite C code is compiled directly into the binary. You do not need to install sqlite3 on the host system. It will automatically create a database.db file in the root of the server folder on boot.

About

A lightweight, compiled Rust Discord bot for custom AI chat endpoints (LiteLLM/OpenAI) with per-user SQLite memory and interactive embeds.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages