TicketBot

v1.4.2 Discord

AI-powered Discord support system for game servers with intelligent context-aware handling of player issues, ticket categorization, and automatic response generation.

TicketBot

Version: 1.4.2 | Discord Bot
Back to Bots
TicketBot

Key Features

  • AI-powered responses via OpenAI integration with context retention
  • Automatic language detection with appropriate responses
  • Context-aware specialized handling for different issue types
  • Complete ticket management system with editable categories and interactive UI
  • Gathers data from user interaction and presents it in a structured format
  • Ticket can be claimed by a staff member to continue with human support
  • Inactivity detection with automatic notifications and ticket auto close functionality
  • Comprehensive transcript generation for closed tickets (admin and user)
  • RustAdmin integration for player statistics and verification
  • RCON integration for direct server command execution
  • Dynamic timestamp management for detailed schedules

Installation

TicketBot requires Python 3.8+ and a Discord Bot Token. An OpenAI API Key is required for the AI functionality. Optional RustAdmin and RCON connections for enhanced capabilities.

pip install -r requirements.txt

Installation Steps

  1. Clone the repository or download the bot files.
  2. Install required dependencies using pip (see above).
  3. Create a Discord bot via the Discord Developer Portal.
  4. Copy the Discord bot token and set up the configuration file.
  5. Configure your database and other settings (see Configuration section).
  6. Start the bot using the run command.

Configuration

The bot's configuration is managed through a central configuration file. Create a .env file with the following settings:

DISCORD_TOKEN="Your Discord Bot Token"
OPENAI_API_KEY="Your OpenAI API Key"
OPENAI_MODEL="The OpenAI model to use (default: gpt-4o-mini)"
TIMEZONE="Server timezone (e.g., America/Santiago)"
LOG_LEVEL="Logging level (e.g., INFO, DEBUG)"
TICKET_CATEGORY_ID="Discord category ID where tickets will be created"
SUPPORT_ROLE_ID="Discord role ID for support staff"
ADMIN_ROLE_ID="Discord role ID for administrators"
TICKET_LOG_CHANNEL_ID="Discord channel ID for logging ticket activity"
SUPPORT_CHANNEL_ID="Discord channel ID for the support interface"
MAX_TICKET_IDLE_TIME="Maximum idle time for tickets before notification (in seconds)"

Configuration Options

Option Description
DISCORD_TOKEN Your Discord Bot Token
OPENAI_API_KEY Your OpenAI API Key
OPENAI_MODEL The OpenAI model to use (default: gpt-4o-mini)
TIMEZONE Server timezone (e.g., America/Santiago)
LOG_LEVEL Logging level (e.g., INFO, DEBUG)
TICKET_CATEGORY_ID Discord category ID where tickets will be created
SUPPORT_ROLE_ID Discord role ID for support staff
ADMIN_ROLE_ID Discord role ID for administrators
TICKET_LOG_CHANNEL_ID Discord channel ID for logging ticket activity
SUPPORT_CHANNEL_ID Discord channel ID for the support interface
MAX_TICKET_IDLE_TIME Maximum idle time for tickets before notification (in seconds)

System Prompt

The System Prompt file defines the bot's personality, capabilities, and knowledge. It provides context for the AI to understand your game servers, rules, and common issues.

You are a helpful support assistant for GameServer, a Rust gaming community with multiple servers. Your task is to help players with their issues, provide information about server rules, and collect necessary information for staff.

System Prompt Guidelines

  • Define your servers and their specific characteristics
  • List the bot's primary responsibilities
  • Include your server rules and policies
  • Specify what information to collect for different issue types
  • Define any special capabilities (RCON access, database queries, etc.)

File location: prompts/system_prompt.txt

Keywords Configuration

The Keywords file helps the bot categorize and respond appropriately to different types of player queries. Each category contains keywords, aliases, and context prompts that are injected when those keywords are detected in user messages.

{
    "vip_issues": {
    "keywords": ["vip","subscription","perk","kit","donation","donor","benefit","privilege"],
    "context_prompt": "The user is asking about VIP features or having issues with VIP perks. Ask for their Steam ID and which server they are playing on. Check if they have an active VIP subscription. For kit-related issues, verify if the server is modded (kits available) or vanilla."
  },  
    "player_reports": {
    "keywords": ["report","cheater","hacker","cheating","aimbot","esp","wall hack","flying"],
    "context_prompt": "The user is reporting a player for rule violations or cheating. Collect the following information: Steam ID of reported player, server name, time of incident, and description of suspicious behavior. Ask if they have video evidence or screenshots."
  },  
    "team_size": {
    "keywords": ["team size","zerg","alliance","teaming","too many players","group size"],
    "context_prompt": "The user is reporting a team size violation. Remind them of server-specific limits: Solo/Duo server (2 max), Quad server (4 max), or 10x server (8 max). Collect location information, player names/IDs, and any evidence they have. Explain the difference between temporary cooperation and formal teaming."
  },  
    "ban_appeals": {
    "keywords": ["appeal","banned","false ban","unban","mistake","wrongfully","ban appeal"],
    "context_prompt": "The user is appealing a ban. Collect their Steam ID, the server they were banned from, when the ban occurred, and their explanation of why they believe the ban should be lifted. Inform them that all bans are thoroughly reviewed with evidence before being issued."
  }  
    }

Keyword Categories

Category Description Context Injection
Vip Issues Keywords related to VIP subscriptions, benefits, and perks
The user is asking about VIP features or having issues with VIP perks. Ask for their Steam ID and wh...
Player Reports Keywords for reporting cheaters, hackers, and rule breakers
The user is reporting a player for rule violations or cheating. Collect the following information: S...
Team Size Keywords for team size violations and alliances
The user is reporting a team size violation. Remind them of server-specific limits: Solo/Duo server ...
Ban Appeals Keywords for players attempting to appeal a ban
The user is appealing a ban. Collect their Steam ID, the server they were banned from, when the ban ...

File location: prompts/keywords.json (JSON format)

When the bot detects keywords in a user's message, it injects the corresponding context prompt into the AI's system message. This helps the bot provide more specific and relevant responses without requiring the user to provide all necessary details upfront.

You can customize both the keyword lists and context prompts to better match your server's specific terminology and support needs.

Specialized Context Handlers

This bot includes specialized context handlers for different types of common user issues:

VIP Issues

Extracts Steam ID and server information, determines if the server is modded (kits available) or vanilla, provides specific guidance based on server type, and explains kit commands and troubleshooting steps

Player Reports

Collects Steam ID of reported player, gathers server information and report reason, integrates with RustAdmin to retrieve player statistics, analyzes player behavior for potential cheating, and guides users on providing evidence

Team Size Issues

Identifies server and team size mentioned, explains server-specific team size limits, provides guidance on alliance rules, and helps users report team size violations

Ban Appeals

Processes ban appeal requests, collects necessary information like Steam ID and server, and provides a structured process for appealing bans

Ticket Categories

This bot supports editable categories for organizing user issues, like:

Category Description Icon
General Support General questions or issues about the server
Report Player Report players breaking rules ⚠️
VIP Support Questions about VIP or issues with VIP perks
Ban Appeal Appeal a ban from one of the servers 🔨

Each ticket category creates a dedicated private channel with specialized forms to collect the appropriate information. Users can interact with the AI assistant to get help with their specific issues.

Bot Information

Version 1.4.2
Language Python
Platform Discord
License Custom
Integration OpenAI, Rust Servers

Need Bot Hosting?

For optimal performance, we recommend hosting your TicketBot on our specialized Discord bot hosting platform. Starting at just $1.99/month, our Python hosting plans provide the perfect environment for running your bot with 24/7 uptime and easy management through the Pterodactyl panel.

View Hosting Plans

Get This Bot

Interested in using this Discord bot for your game server?

Contact Us for Details

Additional Information

This bot is designed specifically for Discord integration with Rust game servers and communities.

Requirements

  • Python 3.8 or higher
  • Discord Bot Token
  • OpenAI API Key

Support

For support with bot implementation or customization, please contact us.