Skip to main content

Integrations

Integrate external services and databases with your ticket system to enhance functionality and provide staff with additional user information.

MySQL

Connect external MySQL databases to your ticket system and display user data directly in Discord tickets.

Premium Feature

MySQL Integrations require a Premium or Pro subscription. Learn more about premium features.

Overview

The MySQL Integrations feature allows you to:

  • Connect one or more MySQL databases to your Discord server
  • Fetch user data based on the ticket creator's Discord ID
  • Display external information (game stats, account details, etc.) when staff click the "User Details" button
  • Customize the integration message with placeholders from your databases

Use Cases

  • Gaming Communities: Display player stats, levels, or account information
  • Support Systems: Show customer account details, subscription status, or order history
  • Community Management: Display member verification status, warnings, or infrared points
  • E-commerce: Show purchase history, loyalty points, or membership tiers

Setup Guide

Step 1: Add a MySQL Database

  1. Navigate to the Integrations tab in your server dashboard
  2. Click the "ADD DATABASE" button
  3. Fill in your database connection details:
Connection Method 1: Individual Fields
  • Database ID: A unique identifier for this database (e.g., gamedb, accounts)
  • Host: Your MySQL server address (e.g., mysql.example.com)
  • Port: MySQL port number (default: 3306)
  • Username: Database username
  • Password: Database password
  • Database Name: The name of the database to connect to
Connection Method 2: Connection URL
  • Connection URL: A complete MySQL connection string
    • Format: mysql://username:password@host:port/database
    • Example: mysql://admin:[email protected]:3306/playerdata
tip

You can use either individual fields OR a connection URL. If both are provided, the connection URL takes priority.

Step 2: Configure Tables

After adding a database, configure which tables to query:

  1. Click on your database card to edit it
  2. Navigate to the "Tables" tab
  3. Click "ADD TABLE" to add a table mapping
  4. Configure each table:
    • Table Name: The name of the table in your database (e.g., users, players)
    • Player Identifier Column: The column that contains Discord IDs (e.g., discord_id, user_id)
Important

The Player Identifier Column must contain Discord user IDs (as strings or bigints) for the integration to match ticket creators with database records.

Step 3: Create Placeholders for Panels

Placeholders map database values to variables you can use in messages.

  1. Go to the Panels tab in your dashboard
  2. Edit or create a panel
  3. Scroll to the Integrations accordion section
  4. Click "ADD PLACEHOLDER" to create a new mapping:
    • Placeholder Name: The variable name (e.g., player_level, account_status)
    • MySQL Path: The data path in format database.table.column
      • Example: gamedb.players.level
      • Example: accounts.users.premium_status
Placeholder Path Format

The MySQL path follows this structure:

database_id.table_name.column_name

Examples:

  • gamedb.players.level → Fetches the level column from the players table in the gamedb database
  • accounts.users.email → Fetches the email column from the users table in the accounts database
  • stats.achievements.total → Fetches the total column from the achievements table in the stats database

Step 4: Customize the Integration Message

After creating placeholders, customize the message shown when staff click "User Details":

  1. In the panel's Integrations section, find "Integrations Message"
  2. Click "Edit Message" to open the message builder
  3. Use your placeholders in the message:
    • Basic Mode: Use {placeholder_name} syntax (e.g., {player_level})
    • Advanced Mode: Use {placeholder_name} in any text component
Default Message

If you don't customize the message, the bot will automatically display all configured placeholders in a default format.

Custom Message Example

Basic Mode (Embed):

Title: User Account Information
Description: Account details for {ticket_owner}

Fields:
- Player Level: {player_level}
- Premium Status: {account_status}
- Total Playtime: {total_hours} hours
- Last Login: {last_login}

Advanced Mode (ComponentsV2):

## 🎮 Player Information
**Discord User:** {ticket_owner}
**Player Level:** {player_level}
**Account Status:** {account_status}
**Total Playtime:** {total_hours} hours
**Last Login:** {last_login}

Step 5: Testing

  1. Create a test ticket using the panel
  2. As a staff member, click the "User Details" button in the ticket
  3. Verify that the data displays correctly
  4. If data shows as "N/A", check your database configuration and placeholder paths

Using Integrations in Tickets

Staff Access

When a ticket is created, staff members will see a "User Details" button in the ticket channel.

To view user data:

  1. Click the "User Details" button
  2. The bot will fetch data from all configured databases
  3. Data is displayed in an ephemeral message (only visible to the person who clicked)

Permission Requirements

Only staff members can view integration data:

  • Users with the panel's Staff Role
  • Users with the Manage Channels permission

Available Placeholders

In addition to your custom MySQL placeholders, these default placeholders are available:

PlaceholderDescriptionExample
{ticket_owner}Discord mention of ticket creator<@123456789>
{timestamp}Current time in relative format<t:1234567890:R>

Database Security

Security Best Practices
  • Use read-only database users for bot connections
  • Never grant write permissions to the bot's database user
  • Use strong passwords for database authentication
  • Whitelist bot's IP address if your database has IP restrictions
  • Enable SSL/TLS for database connections in production
  • Rotate credentials regularly
-- Create a read-only user for the bot
CREATE USER 'ticketer_readonly'@'%' IDENTIFIED BY 'strong_password_here';

-- Grant only SELECT permission on specific tables
GRANT SELECT ON your_database.players TO 'ticketer_readonly'@'%';
GRANT SELECT ON your_database.users TO 'ticketer_readonly'@'%';

-- Apply the changes
FLUSH PRIVILEGES;

Troubleshooting

Integration button doesn't appear

  • Cause: No MySQL databases configured
  • Solution: Add at least one database in the Integrations tab

"N/A" appears instead of data

Possible causes:

  1. Discord ID not found in database

    • Verify the player identifier column contains Discord user IDs
    • Check if the ticket creator's Discord ID exists in your database
  2. Incorrect MySQL path

    • Verify the path format: database_id.table_name.column_name
    • Check for typos in database/table/column names
    • Ensure the database ID matches what you configured
  3. Table not configured

    • Make sure you added the table in the database's Tables tab
  4. Connection failed

    • Verify database credentials are correct
    • Check if the database server is accessible
    • Review bot logs for connection errors

"Premium Required" error

  • Cause: Server doesn't have Premium or Pro subscription
  • Solution: Upgrade to Premium or Pro to use MySQL Integrations

Data is outdated

  • Cause: Integration queries happen in real-time when the button is clicked
  • Solution: Data should always be current; if not, check database connection

Connection timeout

  • Possible causes:

    1. Database server is down or unreachable
    2. Firewall blocking bot's IP address
    3. Invalid host or port configuration
  • Solutions:

    • Verify database server is running
    • Whitelist bot's IP in your firewall
    • Check host and port are correct

Advanced Examples

Gaming Community Example

Database Structure:

-- Table: players
CREATE TABLE players (
discord_id VARCHAR(20) PRIMARY KEY,
username VARCHAR(50),
level INT,
experience INT,
playtime_hours INT,
rank VARCHAR(20),
last_login TIMESTAMP
);

Placeholder Configuration:

player_username → gamedb.players.username
player_level → gamedb.players.level
player_xp → gamedb.players.experience
player_time → gamedb.players.playtime_hours
player_rank → gamedb.players.rank
last_seen → gamedb.players.last_login

Integration Message:

## 🎮 Player Profile

**Username:** {player_username}
**Level:** {player_level} (XP: {player_xp})
**Rank:** {player_rank}
**Playtime:** {player_time} hours
**Last Seen:** {last_seen}

**Ticket Created By:** {ticket_owner}
**Fetched:** {timestamp}

Multi-Database Example

Setup:

  • Database 1: gamedb (player stats)
  • Database 2: shopdb (purchase history)

Placeholders:

player_level → gamedb.players.level
player_coins → gamedb.players.virtual_currency
total_purchases → shopdb.orders.total_spent
last_purchase → shopdb.orders.last_order_date
vip_status → shopdb.memberships.status

Integration Message:

## 📊 User Overview

### Game Stats
- Level: {player_level}
- Coins: {player_coins}

### Purchase History
- Total Spent: ${total_purchases}
- Last Purchase: {last_purchase}
- VIP Status: {vip_status}

---
*User: {ticket_owner} • Retrieved: {timestamp}*

Best Practices

  1. Limit Data Exposure: Only fetch necessary information
  2. Use Descriptive Placeholder Names: Make them easy to understand (e.g., player_level not pl)
  3. Test Before Production: Verify all placeholders work with test data
  4. Document Your Setup: Keep notes on which databases/tables are used
  5. Monitor Performance: Large databases may cause slight delays
  6. Keep Credentials Secure: Never share database passwords in Discord
  7. Regular Backups: Always maintain database backups
  8. Review Permissions: Periodically audit which staff can see integration data

Limitations

  • Maximum databases: No hard limit, but keep it reasonable for performance
  • Maximum placeholders: No hard limit per panel
  • Query timeout: Database queries timeout after 10 seconds
  • Real-time only: Data is fetched on-demand, not cached
  • Discord ID required: Player identifier must be Discord user ID

Need Help?

If you encounter issues with MySQL Integrations:

  1. Check this documentation for common issues
  2. Review bot logs for error messages
  3. Verify database connectivity with a MySQL client
  4. Join our support server for assistance
  5. Contact support with:
    • Error messages from bot logs
    • Database configuration (without credentials)
    • Steps to reproduce the issue