Skip to main content

Discord Bot Integration

Reward your Discord community members with LTZ tokens for participation, engagement, daily check-ins, voice time, streaks, and much more. The official Loyalteez Discord bot is a sophisticated, multi-server solution that integrates seamlessly with the Partner Portal.

Quick Start
  1. Add the bot to your server from Partner Portal → Integrations → Discord
  2. Run /setup connect brand_id:YOUR_BRAND_ID security_key:YOUR_SECURITY_KEY in your Discord server
  3. Your members can immediately use /join, /daily, /balance, and more!

Features Overview

FeatureDescription
Multi-ServerOne bot instance serves all Loyalteez brands
Natural ParticipationReward "gm/gn" messages, quality posts, and popular messages
Daily Check-insAutomated daily rewards with streak bonuses
Voice RewardsReward users for time spent in voice channels
Role-Based MultipliersConfigure roles to give bonus LTZ, cooldown reductions, etc.
Streak SystemTrack consecutive daily activity with milestone bonuses
LeaderboardsMulti-metric rankings (LTZ earned, activity, claims)
Third-Party IntegrationReward level-ups from Mee6, Arcane, Tatsu, Lurkr, and more
Reaction DropsCreate engagement events with reaction-based rewards
Custom Boost EventsConfigure tier-specific and first-boost rewards from monitoring_rules
Perk PurchasesUsers can browse and buy perks directly from Discord
Manual RewardsAdmins can reward valuable contributions on-the-fly
Natural ParticipationAutomatic GM/GN detection, quality messages, and voice tracking
Analytics DashboardServer stats, KPIs, and engagement metrics
Audit LoggingComplete trail of admin actions and events
User SegmentsAuto-categorization of users (whales, at-risk, etc.)
KPI TrackingSet and monitor performance targets with alerts and automated reports
Internal AchievementsGamified milestones beyond LTZ
Gaming IntegrationDiscord presence and Steam achievement rewards
Game NightsScheduled gaming events with bonus rewards
Test ModeSafely test configurations before going live

Getting Started

Step 1: Add the Bot to Your Server

  1. Go to Partner PortalIntegrationsChannelsDiscord
  2. Click "Add Loyalteez Bot to Discord"
  3. Select your server and authorize the bot

Discord Integration Discord integration settings in Partner Portal

Discord Permissions Discord bot permission requirements

Step 2: Connect Your Server to Loyalteez

In your Discord server, run:

/setup connect brand_id:0xYOUR_BRAND_ADDRESS security_key:YOUR_SECURITY_KEY
Where to find your Brand ID

Your Brand ID is your wallet address shown in Partner Portal → Settings → Account (/settings/account). It starts with 0x and is 42 characters long.

Default Events Auto-Created

When you run /setup connect, the bot automatically creates all default events in the database with sensible defaults:

  • GM/GN Check-ins (25/15 LTZ, 24h cooldown)
  • Server Join Bonus (50 LTZ, one-time)
  • Server Boost (500 LTZ)
  • Voice Activity (25 LTZ)
  • Daily Check-in (10 LTZ)
  • And more...

These events are stored in monitoring_rules and can be fully customized via /config events or the Partner Portal.

Step 3: Configure Rewards

After setup, visit the Discord tab in Partner Portal to configure:

  • Event reward amounts
  • Streak bonuses and grace periods
  • Voice time rewards
  • Third-party bot integrations
  • Role-based multipliers

User Commands

DM Support

Some commands can be used in Direct Messages with the bot, while others require server context.

Works in DMsCommands
✅ Yes/balance, /link, /help
❌ No (server required)All other commands

When users try to use server-required commands in DMs, they'll receive a helpful message explaining which commands work in DMs.

Core Commands

CommandDescription
/joinClaim one-time welcome bonus for joining
/dailyClaim daily check-in reward (resets at midnight UTC)
/balanceCheck your LTZ token balance (works in DMs)
/helpView all available commands (works in DMs)

Engagement Commands

CommandDescription
/streakView your current streak and claim milestone rewards
/voiceCheck your voice channel time and claim voice rewards
/activityView your activity stats and claim message milestones
/leaderboardView server rankings by various metrics
/rolesView available loyalty roles and their benefits

Perk Commands

CommandDescription
/perksBrowse available perks from your brand
/perk-buyPurchase a perk directly from Discord
/buy-rolePurchase a role-linked perk with LTZ

Admin Commands

Permission System

The Loyalteez Discord bot features a granular permission system with four permission tiers, allowing you to assign different levels of access to your moderators and administrators.

Permission Tiers

TierLevelDescriptionUse Case
Full Admin4Complete control - can do everythingServer owners, trusted administrators
Event Manager3Create/edit events, change rewards, create dropsCommunity managers who handle events
Perk Manager2Create/edit/delete perksTeam members managing perk catalog
Viewer1View-only access to stats and audit logsAnalysts, read-only access

Default Permissions

  • Users with Discord's "Manage Server" permission automatically get Full Admin access
  • Custom admin roles can be assigned any permission level via /config admin-roles

Permission Hierarchy

Higher permission levels inherit all capabilities of lower levels:

  • Full Admin can do everything (Event Manager + Perk Manager + Viewer)
  • Event Manager can manage events and view analytics
  • Perk Manager can manage perks and view analytics
  • Viewer can only view analytics and export data

Configuring Admin Roles

Assign custom Discord roles with specific permission levels:

/config admin-roles role:@Moderator level:event_manager
/config admin-roles role:@CommunityManager level:perk_manager
/config admin-roles role:@Analyst level:viewer

View current admin roles:

/config admin-roles

Change a role's permission level:

/config admin-roles role:@Moderator level:full_admin

Remove an admin role:

/config admin-roles remove:@Moderator

Clear all custom admin roles:

/config admin-roles clear:true

Permission Level Options

LevelValueDescription
Full Adminfull_adminComplete control (setup, config, everything)
Event Managerevent_managerCreate/edit events, change rewards
Perk Managerperk_managerCreate/edit/delete perks
ViewerviewerView-only access

Examples:

# Add a moderator who can create events but not manage admin settings
/config admin-roles role:@Moderator level:event_manager

# Add a community manager who can manage perks
/config admin-roles role:@CommunityManager level:perk_manager

# Add an analyst with read-only access
/config admin-roles role:@Analyst level:viewer

Admin Channel Notifications

Configure a channel to receive real-time notifications about all reward attempts (success and failure):

/config admin-channel channel:#admin-logs

View current admin channel:

/config admin-channel

Clear admin channel (disable notifications):

/config admin-channel clear:true

Notifications include:

  • ✅ Successful rewards with amount and event type
  • ❌ Failed reward attempts with error messages
  • Role bonuses applied
  • User information and metadata

This provides a real-time audit log similar to /audit rewards, but delivered instantly to your admin channel.

Setup & Configuration

CommandDescriptionRequired Permission
/setupView setup wizard with permission checksFull Admin
/setup connect brand_id:ADDRESS security_key:KEYConnect server to your Loyalteez brand (requires Security Key)Full Admin
/setup checkRun permission auditFull Admin
/setup disconnectDisconnect server from LoyalteezFull Admin
/configView and modify bot configurationViewer+

Perk Management

Create and manage perks directly from Discord without needing the Partner Portal.

CommandDescriptionRequired Permission
/perk createCreate a new perkPerk Manager+
/perk editEdit an existing perkPerk Manager+
/perk deleteDelete a perkPerk Manager+
/perk listList all perks for this serverAny user

Create Perk Options:

/perk create name:"VIP Access" price:1000 description:"Exclusive VIP channel access" category:access max-supply:100 max-per-user:1
OptionRequiredDescriptionDefault
name✅ YesPerk name-
price✅ YesPrice in LTZ-
description❌ NoPerk description-
category❌ NoCategory (access, discount, merch, experience, digital, custom)custom
max-supply❌ NoTotal supply limit (0 = unlimited)0 (unlimited)
max-per-user❌ NoMax claims per user (0 = unlimited)0 (unlimited)
image-url❌ NoImage URL for the perk-
Unlimited Supply

Setting max-supply or max-per-user to 0 means unlimited. This is consistent with how the Partner Portal handles these values.

Configuration Subcommands

CommandDescriptionRequired Permission
/configView current configurationViewer+
/config reward <event> <amount>Set reward for specific eventEvent Manager+
/config eventsView/create/edit/delete eventsEvent Manager+ (create/edit), Viewer+ (list)
/config stacking MODESet role effect stackingFull Admin
/config streaksConfigure streak settingsFull Admin
/config voiceConfigure voice time rewardsFull Admin
/config third-partyConfigure third-party bot integrationsFull Admin
/config sync-rolesImport Discord rolesFull Admin
/config role-bonusConfigure LTZ multipliers and bonuses for rolesFull Admin
/config admin-rolesConfigure admin roles and permission levelsFull Admin
/config admin-channelConfigure admin notification channelFull Admin
/config channelsConfigure channel include/excludeFull Admin
/config userEnable/disable usersFull Admin
/config test-modeEnable/disable test modeFull Admin
/config daily-eventConfigure daily check-in eventEvent Manager+

Events CRUD Commands

Full event management directly from Discord (includes boost events, custom events, and all other event types):

/config events                               - List all events for this brand
/config events action:create name:EVENT reward:LTZ cooldown:HOURS max-claims:N
/config events action:edit name:EVENT reward:20 cooldown:48 max-claims:5
/config events action:toggle name:EVENT - Toggle current state (ON↔OFF)
/config events action:toggle name:EVENT enabled:true - Explicitly enable
/config events action:toggle name:EVENT enabled:false - Explicitly disable
/config events action:delete name:EVENT
Smart Toggle

Running /config events action:toggle name:EVENT without specifying enabled: will automatically invert the current state. If the event is currently ON, it will turn OFF, and vice versa. This makes it easy to quickly toggle events without needing to know their current state.

Understanding Event Claim Limits

Two Independent Levels of Limits:

  1. USER-LEVEL LIMIT (max-claims):

    • Controls how many times each individual user can claim this event
    • This is a per-user cap - applies to every user independently
    • Example: max-claims:3 = Each user can claim up to 3 times (subject to cooldown)
    • Example: max-claims:1 = Each user can claim only once
    • Use -1 or 999999 for unlimited claims per user
    • Stored in max_claims_per_user column in the database
  2. EVENT-LEVEL LIMIT (max-total-claims):

    • Controls the total limit across all users - only the first N users can claim
    • This is an event-wide cap - limits how many total users can participate
    • Example: max-total-claims:100 = Only the first 100 users can claim (each can claim multiple times if user limit allows)
    • Example: max-total-claims:50 = Only the first 50 users can claim
    • Use -1 or 999999 for unlimited total users
    • Stored in rule_metadata.maxTotalClaims in the database

How They Work Together:

These limits are independent and both are checked:

  • User limit is checked first: Can this specific user claim again?
  • Event limit is checked second: Has the total event limit been reached?

Common Combinations:

  • max-claims:3 max-total-claims:-1 = Each user can claim 3 times, unlimited users can participate
  • max-claims:1 max-total-claims:100 = Each user can claim once, but only first 100 users total
  • max-claims:1 max-total-claims:-1 = Each user can claim once, unlimited users can participate
  • max-claims:5 max-total-claims:50 = Each user can claim up to 5 times, but only first 50 users can participate

Reaction Drop Events (special case):

  • When you use an event in a reaction drop (/drop type:reaction), the event's max_claims_per_user is repurposed as the drop's total claim limit
  • Reaction drop events are automatically created with event types like reaction_drop_xxxxx_xxxxx and are marked with 🎯 in the event list

Examples:

# Create event: User limit = 3, Event limit = unlimited
/config events action:create name:repeatable_boost reward:1000 cooldown:0 max-claims:3 max-total-claims:-1

# Create event: User limit = 1, Event limit = 100 (first 100 users only)
/config events action:create name:early_bird reward:500 cooldown:0 max-claims:1 max-total-claims:100

# Create event: User limit = 1, Event limit = unlimited
/config events action:create name:first_boost reward:1000 cooldown:0 max-claims:1 max-total-claims:-1

# Create event: User limit = unlimited, Event limit = unlimited (default)
/config events action:create name:tier_2_boost reward:500 cooldown:0

# Edit existing event: Set user limit to 3, event limit to 200
/config events action:edit name:my_event max-claims:3 max-total-claims:200

# Edit existing event: Set only event limit (keep user limit unchanged)
/config events action:edit name:server_boost max-total-claims:50

# Toggle boost event (auto-inverts current state)
/config events action:toggle name:first_boost

# Explicitly enable or disable
/config events action:toggle name:first_boost enabled:true
/config events action:toggle name:server_boost enabled:false

Events are synced with the Partner Portal monitoring_rules table - changes made in Discord appear in Partner Portal and vice versa.

Role Bonus Commands

Configure LTZ bonuses for Discord roles. Role bonuses apply automatically to all rewards earned by users with that role.

/config role-bonus                           - List all role bonuses
/config role-bonus list:true - List all role bonuses (explicit)
/config role-bonus role:@Role multiplier:1.5 - Set 1.5x LTZ multiplier (50% bonus)
/config role-bonus role:@Role flat-bonus:25 - Set +25 LTZ flat bonus per reward
/config role-bonus role:@Role multiplier:2.0 flat-bonus:10 - Set both effects
/config role-bonus clear:@Role - Remove all bonuses from role

Parameter Limits:

  • multiplier: 1.0 to 5.0 (1.0 = no bonus, 2.0 = double rewards)
  • flat-bonus: 0 to 1,000 LTZ

Examples:

# VIP role gets 50% bonus on all rewards
/config role-bonus role:@VIP multiplier:1.5

# Whale role gets +25 LTZ added to every reward
/config role-bonus role:@Whale flat-bonus:25

# Server boosters get 2x rewards plus 10 flat bonus
/config role-bonus role:@Server Booster multiplier:2.0 flat-bonus:10

# View all configured bonuses
/config role-bonus

# Remove bonuses from a role
/config role-bonus clear:@OldRole
Stacking with Multiple Roles

If a user has multiple roles with bonuses, effects are combined based on your server's stacking mode (multiplicative, additive, or highest only). Configure stacking with /config stacking MODE.

Diagnostic Commands

Run diagnostics to verify your bot setup:

CommandDescription
/test allFull diagnostic suite
/test connectivityTest service connections
/test permissionsCheck bot permissions
/test configValidate configuration
/test reward event:EVENTDry-run reward pipeline
/test reportGenerate shareable diagnostic report

Channel Configuration

Control which channels trigger rewards:

/config channels                - View channel configuration
/config channels exclude:#channel - Exclude channel from rewards
/config channels include-only:#channel - Whitelist mode (ONLY these)
/config channels boost:#channel multiplier:1.5 - Boost channel rewards
/config channels clear:exclude - Clear exclusions
/config channels clear:all - Reset all channel settings

User Management

Manage individual users:

/config user                    - User management overview
/config user disable:@user reason:"Reason" - Disable rewards for user
/config user enable:@user - Re-enable user
/config user status:@user - Check user status
/config user list-disabled - List all disabled users

Test Mode

Safely test configuration changes:

/config test-mode enable:true   - Enable test mode
/config test-mode role:@Testers - Restrict testing to role
/config test-mode enable:false - Disable test mode

Test mode behavior:

  • Only testers/admins receive rewards
  • All events logged with [TEST] flag
  • Does not count toward KPIs

Engagement Tools

CommandDescriptionRequired Permission
/drop event_id:ID type:button/reactionCreate a button or reaction-based drop for any eventEvent Manager+
/drop event_id:ID type:reaction message_id:ID lifespan:2hAttach a reaction drop to an existing messageEvent Manager+
/reaction-dropCreate a reaction-based reward dropEvent Manager+
/reward user:@USER amount:NUMBER reason:TEXTManually reward a userConfigured reward roles

Analytics & Reporting

The bot provides comprehensive analytics tools for admins to track engagement, measure KPIs, and export data.

Server Statistics Dashboard

CommandDescriptionRequired Permission
/statsWeekly overviewViewer+
/stats period:dayDaily statsViewer+
/stats period:monthMonthly statsViewer+
/stats breakdown:eventsEvent breakdownViewer+
/stats breakdown:usersUser segmentsViewer+

The dashboard shows:

  • Total active users
  • LTZ distributed
  • Event breakdown
  • Top earners
  • Growth trends

Audit Logging

Every admin action and significant event is logged:

CommandDescriptionRequired Permission
/auditRecent 25 eventsViewer+
/audit user:@userFilter by userViewer+
/audit type:configFilter by action typeViewer+
/audit export:trueExport as CSVViewer+

Logged actions include:

  • Configuration changes
  • User enable/disable
  • Reward distributions
  • Setup changes

Data Export

Export data for external analysis:

CommandDescriptionRequired Permission
/export type:rewards period:monthReward historyViewer+
/export type:audit period:weekAudit logViewer+
/export type:usersUser databaseViewer+
/export type:configFull config backupViewer+

KPI Tracking & Goals

Setting KPIs

Track performance against targets:

CommandDescriptionRequired Permission
/kpi set metric:daily_active_users target:500 period:weekSet KPI targetViewer+
/kpi set metric:streak_retention target:70 alert_threshold:80Set KPI with alert thresholdViewer+
/kpi listView all KPIs (including inactive)Viewer+
/kpi reportKPI performance reportViewer+
/kpi enable metric:daily_active_usersActivate an inactive KPIAdmin+
/kpi disable metric:churn_rateDeactivate an active KPIAdmin+
/kpi remove metric:top_10_concentrationDelete a KPI configurationAdmin+
/kpi export format:csvExport KPI data as CSVAdmin+
/kpi export format:json start_date:2024-01-01Export historical dataAdmin+

Available KPI Metrics

MetricDescriptionDefault Target
daily_active_usersUsers who claimed rewards in last 24h100
weekly_active_usersUsers who claimed rewards in last 7 days500
streak_retention% of users maintaining active streaks60%
new_user_conversion% of new users who engage beyond joining50%
voice_participation% of active users using voice channels30%
reward_efficiencyAverage LTZ distributed per active user-
churn_rate% of users who became inactive (lower is better)20%
top_10_concentration% of total LTZ held by top 10% of users (lower is better)40%

Period Options:

  • day - Daily targets (resets daily)
  • week - Weekly targets (resets weekly)
  • month - Monthly targets (resets monthly)
  • quarter - Quarterly targets (resets quarterly)

KPI Alerts

Set alert thresholds to get notified when KPIs drop below targets:

/kpi set metric:daily_active_users target:500 alert_threshold:80

When a KPI drops below 80% of its target (400 users in this example), you'll receive an alert in your admin channel. Alerts are automatically rate-limited to once per day per KPI.

Alert Logic:

  • For most metrics: Alert when actual < (target × alert_threshold / 100)
  • For churn_rate and top_10_concentration: Alert when actual > threshold (lower is better)

KPI Snapshots

The system automatically takes daily snapshots of all KPI values at midnight UTC. These snapshots enable:

  • Historical trend analysis
  • Period-over-period comparisons
  • Export functionality with date ranges

Snapshots are stored in the discord_kpi_snapshots table and include complete metric state.

Community Goals

Set server-wide goals for your community:

CommandDescriptionRequired Permission
/goals set name:"Q1 Growth" type:users target:1000 deadline:2024-03-31Set goalViewer+
/goals progressView goal progressViewer+
/goals celebrateCelebrate completed goalsViewer+

Goal Types:

  • users - Total users (synced with weekly_active_users KPI)
  • dau - Daily active users (synced with daily_active_users KPI)
  • ltz_distributed - Total LTZ distributed (synced with reward_efficiency KPI)
  • streak_retention - Streak retention % (synced with streak_retention KPI)
  • custom - Custom goal not linked to KPIs

Goals with matching KPI types are automatically synced when KPIs are calculated.

Scheduled Reports

Automate analytics delivery:

CommandDescriptionRequired Permission
/reports schedule frequency:weekly channel:#admin-stats day:mondaySchedule reportViewer+
/reports previewPreview report formatViewer+
/reports disableDisable scheduled reportsViewer+

User Segments

The bot automatically categorizes users into actionable segments:

/segments                 # View all segment summaries
/segments view segment:at_risk # See users in segment

Automatic Segments

SegmentCriteriaAction
🐋 WhalesTop 10% by LTZVIP treatment
Power UsersHigh daily activityPotential moderators
🆕 New UsersJoined < 7 daysOnboarding focus
⚠️ At RiskInactive 7+ daysRe-engagement needed
💤 DormantInactive 30+ daysWin-back campaigns
🎤 Voice Regulars5+ voice sessions/weekVoice event targets

Internal Achievements

Create achievements to gamify participation beyond LTZ rewards.

Initialize Default Achievements

CommandDescriptionRequired Permission
/achievements initCreate default achievement setEvent Manager+

Custom Achievements

CommandDescriptionRequired Permission
/achievements create name:"Chatterbox" type:message_count threshold:1000 reward:500Create achievementEvent Manager+
/achievements removeRemove achievementEvent Manager+

Achievement Types

TypeTrigger
message_countTotal messages sent
voice_hoursTotal voice time
streak_daysMaximum streak reached
events_claimedTotal events claimed
gm_countGM check-ins
ltz_earnedTotal LTZ accumulated
customAdmin-triggered

View Achievements

/achievements             # Your achievements
/achievements @user # User's achievements
/achievements list # All server achievements
/achievements leaderboard # Top achievers

Gaming Integration

Discord Presence Rewards

Reward users for playing specific games (detected via Discord Rich Presence):

/config gaming presence enable:true
/config gaming presence game:"Valorant" reward:10 min_minutes:30

Steam Integration

Users can link their Steam accounts for achievement-based rewards:

/link steam steam_id:76561198012345678

Configure Steam rewards (requires Steam API key):

/config gaming steam enable:true
/config gaming steam achievement game:730 reward:50

Game Nights

Create special gaming events with bonus rewards:

CommandDescriptionRequired Permission
/game-night create game:"Among Us" duration:2 reward:50Create game nightEvent Manager+
/game-night activeView active game nightsAny user
/game-night joinJoin active game nightAny user
/game-night endEnd & distribute rewardsEvent Manager+

Game nights:

  • Track participants via Discord voice/presence
  • Distribute bonus LTZ to attendees
  • Create community event momentum

Role-Based Rewards System

Configure Discord roles to provide loyalty bonuses to your community members.

Effect Types

EffectDescriptionExample
MultiplierMultiply base rewards1.5x = 50% bonus LTZ
Flat BonusAdd fixed amount to rewards+10 LTZ per claim
Cooldown ReductionReduce wait times25% faster daily reset
Event AccessUnlock exclusive eventsVIP-only drops
One-Time BonusGrant bonus on role assignment100 LTZ welcome gift

Configuration in Partner Portal

  1. Go to Integrations → Channels → Discord
  2. Select your connected server
  3. Click "Configure Role Rewards"
  4. For each role:
    • Select effect type and value
    • Set priority (higher = applied first)
    • Choose assignment method (manual, balance threshold, purchase)

Stacking Modes

Configure how multiple role effects combine:

ModeDescription
MultiplicativeEffects multiply (1.5x × 1.2x = 1.8x)
AdditiveEffects add (+50% + 20% = +70%)
Highest OnlyOnly the best effect applies

Natural Participation

Natural Participation features enable rewards for organic community behavior without requiring slash commands. Users can earn LTZ simply by participating naturally in your server.

Database-Driven Configuration

All Natural Participation events are stored in the monitoring_rules Supabase table. When you connect your server via /setup connect, default events are automatically created. Both the Discord bot and Partner Portal read/write from this same source - no hardcoded values.

If an event doesn't exist in monitoring_rules, it won't process. This ensures full configurability.

Features

FeatureDescriptionInitial DefaultConfigurable
GM Check-inReward users for saying "gm" or "good morning"25 LTZ, 24h cooldown
GN Check-inReward users for saying "gn" or "good night"15 LTZ, 24h cooldown
Quality MessagesReward thoughtful, high-quality messages10 LTZ (disabled)
Popular MessagesReward when messages reach reaction thresholds25 LTZ (disabled)
Auto-WelcomeAutomatically reward new members on join50 LTZ, one-time
Server BoostSpecial reward for Nitro boosters500 LTZ
Voice ActivityReward for time in voice channels25 LTZ

All values are initial defaults. Fully configurable via /config events or Partner Portal.


Server Boost Events

The bot supports custom boost event types that you can configure in Partner Portal. Boost events are automatically detected when users boost your server or when the server tier increases.

Available Boost Event Types

You can create custom boost events with these event types in Partner Portal:

Event TypeDescriptionWhen It Triggers
server_boostDefault boost event (all boosts)Every time someone boosts (default fallback)
first_boostFirst boost rewardUser's first time boosting the server
tier_1_boostTier 1 boost rewardWhen server reaches Tier 1 (2 boosts)
tier_2_boostTier 2 boost rewardWhen server reaches Tier 2 (7 boosts)
tier_3_boostTier 3 boost rewardWhen server reaches Tier 3 (14 boosts)
boost_tier_upgradeTier upgrade rewardWhen server tier increases (Tier 1→2 or 2→3)

Event Priority Order

The bot checks for boost events in this priority order:

  1. Tier-specific (tier_1_boost, tier_2_boost, tier_3_boost) - If server is at that tier
  2. First boost (first_boost) - If user hasn't boosted before
  3. Tier upgrade (boost_tier_upgrade) - If server tier just increased
  4. Generic (server_boost) - Default fallback if no custom events configured

Example: If you have both first_boost and tier_2_boost configured, and a user boosts for the first time when the server is at Tier 2:

  • The bot will trigger tier_2_boost (higher priority)
  • first_boost will trigger on their next boost (if you configure it for subsequent boosts)

Creating Custom Boost Events

You can configure boost events in two ways: via Discord commands or Partner Portal.

Admins can create and manage boost events directly from Discord:

Create a boost event:

/config events action:create name:first_boost reward:1000 cooldown:0 max-claims:1
/config events action:create name:tier_2_boost reward:500 cooldown:0

Edit an existing boost event:

/config events action:edit name:first_boost reward:1500
/config events action:edit name:server_boost reward:600 cooldown:720

Toggle event on/off:

/config events action:toggle name:first_boost enabled:true
/config events action:toggle name:server_boost enabled:false

List all boost events:

/config events

Option 2: Partner Portal (Full Configuration)

For advanced configuration with channel constraints, detection methods, and metadata:

  1. Go to EventsCreate Event
  2. Enter event details:
    • Event Name: "First Boost" or "Tier 2 Boost"
    • Event Type: first_boost or tier_2_boost (normalized automatically)
    • Reward: Set your desired LTZ amount
    • Max Claims: 1 for first boost, 999999 for recurring
    • Cooldown: 0 for one-time, or set cooldown for recurring boosts
    • Detection Method: Select "Discord"
    • Enable: Toggle ON

Both methods sync to the same monitoring_rules table - changes made in Discord appear in Partner Portal and vice versa.

Event Automatically Triggers

No additional configuration needed - the bot detects boosts and matches them to your configured events automatically based on priority order.

Example Configuration

Scenario: Reward first boost generously, then standard rewards for subsequent boosts

  1. Create first_boost event:

    • Reward: 1,000 LTZ
    • Max Claims: 1
    • Cooldown: 0
    • Enabled: ✅
  2. Create server_boost event (for subsequent boosts):

    • Reward: 500 LTZ
    • Max Claims: 999999
    • Cooldown: 0 (or 2,592,000 seconds = 30 days for monthly)
    • Enabled: ✅

Result:

  • First boost: User gets 1,000 LTZ (from first_boost event)
  • Subsequent boosts: User gets 500 LTZ (from server_boost event)

Tier-Specific Rewards Example

Scenario: Scale rewards based on server tier

  1. Create tier_1_boost event:

    • Reward: 200 LTZ
    • Enabled: ✅
  2. Create tier_2_boost event:

    • Reward: 500 LTZ
    • Enabled: ✅
  3. Create tier_3_boost event:

    • Reward: 1,000 LTZ
    • Enabled: ✅

Result:

  • When server is Tier 1: Boosters get 200 LTZ
  • When server is Tier 2: Boosters get 500 LTZ
  • When server is Tier 3: Boosters get 1,000 LTZ

First Boost Detection

The bot automatically tracks whether a user has boosted before:

  • First boost: Triggers first_boost event (if configured)
  • Subsequent boosts: Triggers server_boost or tier-specific events

First boost status is permanently stored in KV, so first_boost will only fire once per user, even across server restarts.

Tier Upgrade Events

When the server tier increases (e.g., from Tier 1 to Tier 2), the bot can trigger a boost_tier_upgrade event:

  • Detected automatically via guildMemberUpdate event
  • Includes new tier level in event data
  • Useful for rewarding users when the server reaches milestone tiers

GM/GN Check-in Patterns

The bot recognizes these natural patterns (case-insensitive):

Good Morning:

  • gm, GM
  • good morning
  • gm everyone, gm fam, gm frens
  • morning!
  • rise and shine

Good Night:

  • gn, GN
  • good night
  • gn everyone, gn fam
  • nighty night
  • sweet dreams, sleep well

Quality Message Scoring

Messages are scored based on:

  • Length (100+ characters)
  • Word count (20+ words)
  • Contains code (bonus points)
  • Contains helpful links (bonus points)
  • Multi-paragraph (bonus points)

Messages scoring above the threshold receive rewards (max 5 per day by default).

Configuration

Configure Natural Participation in Partner Portal → Integrations → Discord → Natural Participation:

{
gmCheckin: {
enabled: true,
reward: 25,
cooldownHours: 24,
responseEnabled: false
},
gnCheckin: {
enabled: true,
separateCooldown: false,
reward: 15
},
messageQuality: {
enabled: false,
minCharacters: 100,
minWords: 20,
rewardPerQualityMessage: 10,
maxDailyRewards: 5
},
reactionRewards: {
enabled: false,
thresholdForPopular: 10,
popularMessageReward: 25
},
welcomeAutomation: {
enabled: false,
autoRewardOnJoin: false
}
}

How Natural Participation Works

When you connect your Discord server via /setup, natural participation features are automatically enabled:

  1. Real-time Detection: Loyalteez monitors messages in your server for GM/GN patterns, quality content, and engagement
  2. Automatic Rewards: When patterns are detected, rewards are automatically distributed to users
  3. No Configuration Needed: Default settings work out of the box, but you can customize via /config

What Gets Detected:

  • GM/GN messages (with 24-hour cooldown)
  • Quality messages (100+ characters, thoughtful content)
  • Voice channel activity
  • Third-party bot level-ups (Mee6, Arcane, etc.)
  • Server boosts

Verification: Run /test all in your Discord server to verify natural participation is working. You should see "Natural Participation: Active" in the diagnostic report.


Streak & Attendance System

Reward consistent engagement with streak bonuses.

How It Works

  1. Users check in daily with /daily
  2. Consecutive days build their streak counter
  3. Streak multipliers increase rewards
  4. Milestone bonuses unlock at 7, 30, 100, 365 days

Default Streak Multipliers

Streak DaysMultiplier
3+ days1.1x (10% bonus)
7+ days1.25x (25% bonus)
14+ days1.5x (50% bonus)
30+ days2.0x (100% bonus)

Milestone Bonuses

MilestoneBonus
7 days50 LTZ
30 days200 LTZ
100 days1,000 LTZ
365 days5,000 LTZ

Grace Period

Configure a grace period (1-72 hours, default: 24 hours) that allows users to miss time without losing their streak.

/config streaks grace-period:8    # 8 hour grace period
/config streaks grace-period:48 # 48 hour grace period

Shorter grace periods (e.g., 8 hours) encourage more frequent engagement while longer periods (48-72 hours) are more forgiving for casual communities.


Voice Channel Rewards

Reward users for time spent in voice channels.

Configuration

SettingDescriptionDefault
Minutes per rewardHow often rewards are given30 min
LTZ per rewardAmount per reward cycle5 LTZ
Max daily rewardsDaily cap10 (150 min)

How It Works

  1. Bot tracks time spent in voice channels (not AFK)
  2. Every X minutes, user earns Y LTZ
  3. Users can check progress with /voice
  4. Daily cap prevents abuse

Third-Party Bot Integration

Automatically reward users when they level up or achieve milestones in other popular bots.

Events Created as Configurable

When you enable a third-party bot via /config third-party enable:<bot>, the bot creates events in monitoring_rules with default settings (25 LTZ, no cooldown). These events are then fully configurable like any other event:

/config third-party enable:mee6    # Creates mee6_level_up event
/config events action:edit name:mee6_level_up reward:100 cooldown:1

This ensures third-party bot rewards are managed the same way as all other events.

Third-Party Commands

/config third-party                          - View status of all third-party integrations
/config third-party enable:<bot> - Enable a bot and create its events
/config third-party disable:<bot> - Disable a bot (events deactivated, not deleted)
/config third-party reward:<bot> amount:<N> - Set reward amount (1-10,000 LTZ)

Examples:

# Enable Mee6 integration (creates mee6_level_up event)
/config third-party enable:mee6

# Set reward for Arcane level-ups
/config third-party reward:arcane amount:50

# Disable Tatsu integration
/config third-party disable:tatsu

# Check current status
/config third-party
Validation

The bot provides helpful error messages if you forget a required parameter:

  • reward:mee6 without amount: → Shows "Missing amount!" with usage example
  • amount:50 without reward: → Shows "Missing bot name!" with supported bot list

Supported Bots (15 Total)

BotEvents Tracked
Mee6Level-ups, leaderboard milestones
ArcaneLevel-ups, daily streaks
Arcane PremiumLevel-ups (premium features)
TatsuLevel-ups, achievements
Carl-botReaction roles, moderation rewards
The EngageEngagement milestones, XP
Rumble RoyaleBattle wins, tournament placements
LurkrLevel-ups, role rewards
Atom (leveling.gg)Level-ups, XP gains
DynoLevel-ups, announcements
AmariBotLevel-ups, weekly rewards
ProBotLevel-ups, XP
UnbelievaBoatLevel-ups, economy rewards
ZiraReaction roles
YAGPDBLevel-ups, reputation

Setup

  1. Go to Partner Portal → Integrations → Discord → Third-Party Integrations
  2. Enable desired integrations
  3. Configure reward amounts per event type
  4. The bot will automatically parse messages from these bots

Example: Mee6 Level-Up Rewards

// When Mee6 posts a level-up message:
// "🎉 @User just reached level 10!"

// Loyalteez bot detects this and rewards:
// Level 10 = 100 LTZ (10 LTZ per level by default)

Reaction Drops & Engagement Events

Create engaging events where users react to claim rewards. Drops can be attached to any message (including announcements you post) and linked to custom event types from your Partner Portal.

Enhanced /drop Command

The /drop command supports both button-based and reaction-based drops, with full integration to custom events configured in your Partner Portal.

Basic Usage

Button-based drop (default):

/drop event_id:announcement_engagement label:"Claim Reward" description:"Special announcement reward!"

Reaction-based drop (attach to existing message):

/drop event_id:announcement_engagement type:reaction message_id:123456789 emoji:🎉 lifespan:2h

Full Command Options

ParameterRequiredDescriptionExamples
event_id✅ YesEvent ID from Partner Portal (supports spaces: "Announcement Engagement" → announcement_engagement)announcement_engagement, gm_checkin
type❌ NoDrop type: button or reaction (default: button)button, reaction
message_id❌ NoDiscord message ID to attach reaction drop to (for reaction drops)123456789012345678
emoji❌ NoEmoji for reaction drops (default: 🎉)🎉, , 💰
lifespan❌ NoDrop lifespan: time units or permanent/0 (default: 24h)1s, 5m, 2h, 24h, permanent
label❌ NoButton label text (for button drops)"Claim Reward"
description❌ NoDescription message above button/drop"Special announcement reward!"

Lifespan Options

Drops can be configured with precise time-based lifespans or set to never expire:

Time-based (1 second to 168 hours):

  • 1s - 1 second (great for testing)
  • 5m - 5 minutes
  • 2h - 2 hours
  • 24h - 24 hours (default)
  • 168h - 1 week (maximum timed)

Permanent (never expires):

  • permanent - Drop never expires
  • 0 - Drop never expires (alternative)
  • unlimited - Drop never expires (alternative)
  • forever - Drop never expires (alternative)

Note: Permanent drops remain active until manually deleted or max claims are reached.

Embedding Drops in Announcements

You can embed reaction drops directly into your announcements:

  1. Post your announcement in Discord (e.g., @everyone Special surprise integrated into discord!)
  2. Right-click the message → Copy Message ID
  3. Run the drop command:
    /drop event_id:announcement_engagement type:reaction message_id:PASTE_MESSAGE_ID lifespan:2h emoji:🎉
  4. Bot automatically adds the emoji reaction to your message
  5. Users react with the emoji to claim rewards

Custom Event Integration

Reaction drops are fully integrated with custom events from your Partner Portal:

Example: Announcement Engagement Event

  1. Create event in Partner Portal:

    • Name: Announcement Engagement
    • Event Type: announcement_engagement (normalized automatically)
    • Reward: 25 LTZ
    • Max Claims Per User: 50 (this becomes the drop's total claim limit - first 50 users can claim)
    • Cooldown: 1 hour
    Max Claims: Event-Level vs Drop-Level
    • Event-level max_claims_per_user: When used in a reaction drop, this value becomes the total number of users who can claim the drop (not per-user). For example, max_claims_per_user: 50 means the first 50 users who react can claim it.
    • Drop-level behavior: Each user can only claim a reaction drop once, regardless of the event's max_claims_per_user setting. The event's max_claims_per_user value controls how many total users can claim.
  2. Use the event in Discord:

    /drop event_id:Announcement Engagement type:reaction message_id:123456789 lifespan:2h

    (Event name with spaces is automatically normalized: "Announcement Engagement" → announcement_engagement)

  3. Event configuration is pulled from Partner Portal:

    • Reward amount comes from event config
    • Max Claims Note: The event's max_claims_per_user (per-user limit) is used as the drop's total claim limit (how many total users can claim). For example, if an event has max_claims_per_user: 50, the reaction drop will allow up to 50 total users to claim it, not 50 claims per user.
    • Cooldown periods respected
    • All claims tracked for analytics

Event Name Normalization

Event names with spaces are automatically normalized when stored:

  • "Announcement Engagement"announcement_engagement (database)
  • Both formats work in the /drop command
  • Lookups match normalized names automatically

How Reaction Drops Work

  1. Admin creates drop → Bot creates drop record and (optionally) adds emoji to message
  2. Users react with the specified emoji to the message
  3. Worker validates:
    • ✅ Active drop exists for this message
    • ✅ Correct emoji used
    • ✅ User hasn't already claimed
    • ✅ Max claims not reached
    • ✅ Drop hasn't expired (if timed)
    • ✅ Event is enabled in Partner Portal
  4. Reward distributed → User receives LTZ from event config
  5. Feedback sent → ✅ emoji reaction confirms successful claim
  6. DM notification → User receives a DM confirming the reward amount
  7. Analytics tracked → Claim recorded in audit log for /stats
DM Notifications

When users successfully claim a reaction drop, they receive a Direct Message from the bot confirming the reward:

"🎉 You claimed 25 LTZ from a reaction drop in Server Name!"

This provides immediate feedback without cluttering the channel.

Channel-Based Custom Events

Events can be configured to trigger only in specific channels:

Example: Technical Discussion Event

  • Event: technical_discussion
  • Detection: Discord interaction
  • Allowed Channels: dev-chat, bot-demo-channel
  • Reward: 5 LTZ per message in these channels

Users posting in #dev-chat or #bot-demo-channel automatically receive rewards when the event is configured in Partner Portal with these channel constraints.

Configure in Partner Portal:

  1. Go to Events → Select event
  2. In Detection Methods, ensure Discord is selected
  3. Enter channel names in Allowed Channels field (comma-separated)
  4. Event only triggers in listed channels

Manual Rewards (/reward)

Allow trusted roles to reward users for valuable contributions.

Usage

/reward user:@Username event_id:helpful_contribution

Configuration

  1. Allowed Roles: Configure which roles can use /reward in Partner Portal
  2. Event Types: Restrict which events can be triggered manually
  3. Cooldowns: Set per-user cooldowns to prevent abuse
  4. Public Recognition: Optionally post a public message when rewards are given

Example Events

Event IDDescriptionSuggested Reward
helpful_answerHelping community members25 LTZ
bug_reportReporting bugs50 LTZ
content_creationCreating guides/content100 LTZ
event_participationAttending community events20 LTZ

Leaderboards

Display rankings across multiple metrics. Leaderboards show proper Discord @mentions so you can easily see and interact with top performers.

Metrics

MetricDescription
ltz_earnedTotal LTZ earned in this server
activity_scoreCombined engagement score
claims_countTotal successful claims
streak_currentCurrent daily streak
voice_minutesTotal voice channel time

Usage

/leaderboard metric:ltz_earned period:weekly
ParameterOptions
metricltz_earned, activity_score, claims_count, streak_current, voice_minutes
perioddaily, weekly, monthly, all_time
Discord @Mentions

Leaderboard entries display users as clickable Discord mentions (e.g., @Username) rather than plain text usernames. This makes it easy to recognize, tag, or interact with top community members directly from the leaderboard.


Partner Portal Configuration

Discord Tab Location

Integrations → Channels → Discord

Available Settings

Event Rewards

  • Join bonus amount
  • Daily check-in amount
  • Message milestone rewards
  • Voice time rewards
  • Reaction rewards

Event-Level Channel Constraints

Restrict specific events to only trigger in designated channels. This is configured per-event in Partner Portal → Events → Event Details.

How to Configure:

  1. Go to Events in Partner Portal
  2. Click on an event to expand details
  3. In Detection Methods section, ensure Discord is selected
  4. Enter allowed channel names in the Allowed Channels field

Example:

Allowed Channels: feedback, support, tech-talk

Behavior:

  • If channels are specified: Event only triggers when message/action occurs in listed channels
  • If channels are empty: Event triggers in any channel (no restriction)
  • Channel names are case-insensitive
  • Use channel names without # prefix (e.g., feedback not #feedback)

Use Cases:

EventAllowed ChannelsPurpose
Bug Reportreport-bugs, bugsOnly count bug reports from dedicated channels
Tech Discussiontech-talk, dev-chatReward quality posts in technical channels
GM Check-ingm-gnPrevent GM spam in general channels
Product Feedbackfeedback, suggestionsDirect feedback to appropriate channels
Import with Channels

When importing events from CSV or Markdown, include a channels column:

name,reward_amount,detection_method,channels
Bug Report,25,discord,report-bugs|bugs
Tech Discussion,5,discord,tech-talk|dev-chat

Streak Settings

  • Enable/disable streaks
  • Grace period (days)
  • Streak multipliers (3/7/14/30 day thresholds)
  • Milestone bonuses (7/30/100/365 day amounts)

Voice Settings

  • Minutes per reward
  • LTZ per reward
  • Maximum daily rewards

Third-Party Integrations

  • Toggle each integration
  • Configure rewards per level-up
  • Set detection sensitivity

Role Configuration

  • Define role effects (multipliers, bonuses, etc.)
  • Set assignment methods
  • Configure stacking behavior

User Identification

Loyalteez maps Discord users to blockchain wallets deterministically:

discord_{USER_ID}@loyalteez.app

How It Works

  1. Deterministic: Same Discord user always gets the same wallet
  2. Cross-Server: Rewards from different servers accumulate
  3. Perk Access: Users log into perks.loyalteez.app with Discord to spend LTZ

Wallet Resolution

When a user interacts with the bot:

  1. Bot extracts Discord user ID
  2. Generates deterministic email identifier
  3. Loyalteez API resolves or creates wallet via Privy
  4. Rewards are sent to this wallet

Database Schema

The bot uses Supabase for persistence. Key tables:

Core Tables

discord_server_configs

Stores server-to-brand linkages and configuration.

server_id      TEXT PRIMARY KEY
brand_id TEXT NOT NULL
server_name TEXT
is_active BOOLEAN DEFAULT TRUE
config_metadata JSONB -- Stores event configs, role settings, etc.

discord_role_configs

Stores role-based reward configurations.

server_id       TEXT
discord_role_id TEXT
effect_type TEXT -- multiplier, flat_bonus, cooldown_reduction, etc.
effect_value NUMERIC
priority INTEGER

discord_user_stats

Tracks per-user statistics.

server_id       TEXT
discord_user_id TEXT
messages_count INTEGER
voice_minutes INTEGER
reactions_count INTEGER
ltz_earned BIGINT

discord_user_streaks

Tracks user streak data.

server_id        TEXT
discord_user_id TEXT
current_streak INTEGER
longest_streak INTEGER
last_checkin TIMESTAMPTZ

Admin & Analytics Tables

discord_audit_log

Comprehensive audit trail for all admin actions.

server_id       TEXT NOT NULL
brand_id TEXT
actor_type TEXT -- 'admin', 'bot', 'system', 'user'
actor_id TEXT -- Discord user ID or 'system'
action TEXT NOT NULL -- Action type (e.g., 'config_update')
target_user_id TEXT -- Affected user, if applicable
details JSONB -- Structured action details
before_state JSONB -- State before change
after_state JSONB -- State after change
is_test BOOLEAN DEFAULT FALSE
created_at TIMESTAMPTZ DEFAULT NOW()

discord_kpi_configs

KPI target configuration per server.

server_id       TEXT NOT NULL
metric TEXT NOT NULL -- e.g., 'daily_active_users', 'streak_retention'
target_value NUMERIC NOT NULL
period TEXT DEFAULT 'week' -- 'day', 'week', 'month', 'quarter'
alert_threshold NUMERIC -- Alert when below this % of target (0-100)
is_active BOOLEAN DEFAULT TRUE
created_at TIMESTAMPTZ DEFAULT NOW()
updated_at TIMESTAMPTZ DEFAULT NOW()

Available Metrics:

  • daily_active_users - Users who claimed rewards in last 24h
  • weekly_active_users - Users who claimed rewards in last 7 days
  • streak_retention - % of users maintaining active streaks
  • new_user_conversion - % of new users who engage beyond joining
  • voice_participation - % of active users using voice channels
  • reward_efficiency - Average LTZ distributed per active user
  • churn_rate - % of users who became inactive
  • top_10_concentration - % of total LTZ held by top 10% of users

discord_kpi_snapshots

Historical KPI data for trend analysis.

server_id     TEXT NOT NULL
snapshot_date DATE NOT NULL
snapshot_type TEXT DEFAULT 'daily' -- 'daily', 'weekly', 'monthly'
metrics JSONB NOT NULL -- All KPI values at snapshot time
created_at TIMESTAMPTZ DEFAULT NOW()

Snapshots are automatically generated daily at midnight UTC. The metrics JSONB field contains:

  • All active KPI values with actual/target/achieved status
  • Server stats (users, engagement, rewards)
  • Period comparisons
  • Timestamp information

discord_goals

Community goals configuration.

server_id     TEXT NOT NULL
name TEXT NOT NULL
type TEXT NOT NULL -- 'users', 'ltz', 'events', etc.
target NUMERIC NOT NULL
current NUMERIC DEFAULT 0
deadline DATE
is_completed BOOLEAN DEFAULT FALSE
celebrated BOOLEAN DEFAULT FALSE

discord_scheduled_reports

Automated report scheduling.

server_id     TEXT NOT NULL PRIMARY KEY
channel_id TEXT NOT NULL
frequency TEXT DEFAULT 'weekly' -- 'daily', 'weekly', 'monthly'
day_of_week INTEGER -- 0-6 for weekly reports
is_active BOOLEAN DEFAULT TRUE
last_sent TIMESTAMPTZ

Gaming Tables

discord_gaming_configs

Gaming integration settings.

server_id     TEXT NOT NULL PRIMARY KEY
presence_enabled BOOLEAN DEFAULT FALSE
steam_enabled BOOLEAN DEFAULT FALSE
game_configs JSONB -- Per-game settings

User Steam account links.

server_id       TEXT NOT NULL
discord_user_id TEXT NOT NULL
steam_id TEXT NOT NULL
verified BOOLEAN DEFAULT FALSE
linked_at TIMESTAMPTZ DEFAULT NOW()

Achievement Tables

discord_achievements

Server achievement definitions.

server_id     TEXT NOT NULL
name TEXT NOT NULL
description TEXT
type TEXT NOT NULL -- 'message_count', 'voice_hours', etc.
threshold INTEGER NOT NULL
reward INTEGER DEFAULT 0 -- LTZ reward
icon TEXT -- Emoji
is_active BOOLEAN DEFAULT TRUE

discord_user_achievements

User achievement progress.

server_id       TEXT NOT NULL
discord_user_id TEXT NOT NULL
achievement_id UUID NOT NULL
progress INTEGER DEFAULT 0
unlocked BOOLEAN DEFAULT FALSE
unlocked_at TIMESTAMPTZ

KPI System Architecture

The KPI system is built on a robust architecture with automated monitoring, alerting, and reporting capabilities.

Core Components

  1. KPIService (src/services/kpi-service.js)

    • Calculates all 8 KPI metrics
    • Manages KPI configurations
    • Handles snapshots and exports
    • Provides performance monitoring
  2. Alert System (src/cron/kpi-alert-checker.js)

    • Runs every 15 minutes
    • Checks all active KPIs for threshold breaches
    • Sends Discord notifications via RewardNotificationService
    • Rate-limited to prevent spam
  3. Report Generator (src/cron/report-generator.js)

    • Runs every hour
    • Processes scheduled reports
    • Posts to Discord channels
    • Supports stats, kpi, and full report types
  4. Snapshot System

    • Automatic daily snapshots at midnight UTC
    • Stored in discord_kpi_snapshots table
    • Includes complete KPI state and server stats

Performance Features

  • SQL Aggregations: Uses database aggregations instead of in-memory calculations where possible
  • Batch Queries: Processes large datasets in batches (1000 records at a time)
  • Caching: Extended cache TTLs (10 min guild data, 1 hour comparisons, 24 hours snapshots)
  • Rate Limiting: Discord API calls are rate-limited with exponential backoff
  • Circuit Breaker: Automatic fallback to audit log data if Discord API fails
  • Performance Monitoring: Built-in metrics tracking (query times, cache hit rates, errors)

Reliability Features

  • Error Handling: Comprehensive try-catch blocks with graceful degradation
  • Input Validation: All inputs validated before processing
  • Division by Zero Protection: All percentage calculations handle zero denominators
  • Data Freshness Validation: Warns if cached data is > 1 hour old
  • Fallback Data Sources: Uses audit log if Discord API unavailable

API Endpoints

The Discord bot exposes several endpoints for advanced integrations:

Webhook Endpoints

EndpointMethodDescription
/webhook/perk-claimPOSTProcess perk claims and assign Discord roles
/webhook/messagePOSTProcess forwarded bot messages

API Endpoints

EndpointMethodDescription
/api/sync-rolesPOSTTrigger role synchronization from Partner Portal
/healthGETHealth check endpoint

Best Practices

New Server Checklist

  1. ✅ Run /setup check to verify permissions
  2. ✅ Configure welcome bonus (/config reward discord_join 100)
  3. ✅ Enable daily rewards (/config reward daily_checkin 25)
  4. ✅ Enable streaks (/config streaks enable:true)
  5. ✅ Set up milestones and multipliers
  6. ✅ Exclude announcement/rules channels
  7. ✅ Initialize achievements (/achievements init)
  8. ✅ Set KPI targets (/kpi set metric:daily_active_users target:100)

Preventing Abuse

  1. Use Test Mode: Enable test mode when configuring
  2. Exclude Bot Channels: Remove reward triggers from bot-only channels
  3. Daily Caps: Limit voice/message rewards per day
  4. Role Gates: Require minimum account age or roles
  5. User Management: Disable rewards for problematic accounts
  6. Audit Monitoring: Review /audit regularly for suspicious activity

Maximizing Engagement

  1. Embed Drops in Announcements: Use /drop type:reaction message_id:... to attach rewards to your announcements for instant engagement
  2. Channel-Specific Events: Configure events with channel constraints to reward quality participation in focused channels
  3. Streak Incentives: Promote streak system to encourage daily visits
  4. Role Rewards: Create aspirational roles with meaningful bonuses
  5. Third-Party Sync: Reward existing bot engagement
  6. Achievements: Initialize achievements to gamify participation
  7. Game Nights: Schedule regular gaming events with bonus rewards
  8. Permanent Drops: Create permanent reaction drops on important messages (rules, welcome, resources) that never expire

Analytics Best Practices

  1. Set KPIs Early: Define success metrics before launch
  2. Monitor Segments: Check /segments view segment:at_risk weekly
  3. Schedule Reports: Use /reports schedule for automated insights
  4. Export Data: Monthly exports for backup and analysis
  5. Goal Tracking: Set community goals for motivation

Technical Recommendations

  1. Permission Audit: Run /setup check after Discord changes
  2. Regular Syncs: Use /config sync-roles if roles change
  3. Test First: Enable test mode during configuration
  4. Monitor Logs: Check audit logs for errors

Troubleshooting

Bot Not Responding

  1. Check bot permissions with /setup check
  2. Verify bot role is above managed roles
  3. Check channel permissions specifically
  4. Ensure /setup was completed successfully

Rewards Not Processing

  1. Verify event is enabled (/config events)
  2. Check if user is disabled (/config user status:@user)
  3. Check if test mode is on (/config test-mode)
  4. Check channel exclusions (/config channels)
  5. Review audit log (/audit)
  6. Verify brand has LTZ balance

Role Effects Not Applying

  1. Verify Manage Roles permission
  2. Ensure bot role is higher than target roles
  3. Run /config sync-roles to refresh
  4. Check role config with /roles

Stats Not Updating

  1. Allow time for data aggregation
  2. Check if test mode is filtering data
  3. Verify audit logging is working (/audit)

Third-Party Bots Not Detecting

  1. Verify bot is enabled (/config third-party)
  2. Check channel permissions for bot messages
  3. Ensure correct bot is configured

Server Not Showing in Partner Portal

  1. Ensure /setup connect brand_id:... security_key:... was run with correct address and security key
  2. Check Supabase discord_server_configs table
  3. Verify RLS policies allow your brand to read data

Support


Sample Loyalty Programs

These sample programs provide structured templates for building your own Discord loyalty strategy. Each program demonstrates different approaches to incentivizing community participation.


Sample Program 1: Developer & Product Community

Philosophy: Reward real participation, not noise. Focus on onboarding, technical discussion, feedback, and habit formation.

Program Goals
  1. Onboard members who understand the product
  2. Encourage thoughtful technical discussion
  3. Turn feedback and bug reports into product improvements
  4. Reinforce habits that keep contributors coming back

Onboarding Events (One-Time)

EventRewardChannelDescription
Read #about-us10 LTZ#about-usVerified view of about channel
Read #server-rules10 LTZ#server-rulesAcknowledged rules
First message in #lobby10 LTZ#lobbyWelcome participation

Implementation:

/config events onboarding_about:10 onboarding_rules:10 onboarding_lobby:10

Technical Contribution (Quality-Gated)

EventRewardFrequencyChannel
Thoughtful question or technical answer5 LTZWeekly max#tech-talk

Note: Quality-gated, not message count. Use /reward for admin validation.

Product Feedback

EventRewardValidationChannel
Actionable feedback post15 LTZPer accepted#feedback
Valid bug report (repro steps)25 LTZPer validated#report-bugs

Topics: UX improvements, pricing feedback, missing features, flow issues.

Community Support

EventRewardLimitChannel
Help another member40 LTZMonthly#support, #live-tickets

Validation: Confirmed by mod or ticket resolution.

Educational Engagement

EventRewardChannel
Watch video from tutorials10 LTZ#edu-videos, #tutorials
Share learning takeaway10 LTZ#edu-videos

Developer Contributions

EventRewardChannel
Code/architecture insight20 LTZ#dev-chat
Trigger GitHub activity20 LTZ#github-log

Habit Formation

EventRewardRequirement
7-day active streak15 LTZNon-spam participation

Creative Contribution

EventRewardChannelBonus
Original visual/meme/diagram10 LTZ#images-art+10 LTZ if reused by brand

VIP Tier (Unlock Required)

EventRewardLimitChannel
Strategic discussion20 LTZ40 LTZ/month#vip-chat

Access: Earn via cumulative actions.

Sample Monthly Budget

CategoryEst. TriggersLTZ/moUSD Equiv
Onboarding50 users1,500$1.50
Tech contributions20 posts100$0.10
Feedback10 posts150$0.15
Bug reports5 reports125$0.13
Support help10 helpers400$0.40
Education30 completions600$0.60
Dev contributions15 contributions600$0.60
Streaks25 streaks375$0.38
Creative15 posts150$0.15
Total~4,000~$4.00

Sample Program 2: Gaming Community

Philosophy: Reward active participation, competitive engagement, and community building. Focus on voice chat, events, and social interaction.

Program Goals
  1. Maximize active voice participation
  2. Reward competitive and cooperative play
  3. Build strong social connections
  4. Create engaging community events

Welcome & Daily

EventRewardFrequency
Server join bonus100 LTZOne-time
Daily check-in25 LTZDaily
Daily check-in (with 7+ streak)50 LTZDaily

Voice Channel Rewards

EventRewardLimit
30 minutes voice time15 LTZ10/day (5 hours)
Active game voice (playing together)25 LTZ5/day

Implementation:

/config voice minutes_per_reward:30 ltz_per_reward:15 max_daily:10

Level-Up Integration (Mee6/Arcane)

Level RangeReward per Level
1-1025 LTZ
11-2550 LTZ
26-50100 LTZ
51+200 LTZ

Implementation:

/config third-party mee6:enabled ltz_per_level:25

Event Participation

EventRewardChannel
Tournament registration50 LTZ#tournaments
Tournament participation100 LTZPer event
Tournament win500 LTZPer win
Game night attendance75 LTZ#game-nights

Social Engagement

EventRewardFrequency
LFG post (looking for group)10 LTZ3/day
Help new player50 LTZ5/week
Stream announcement25 LTZ1/day

Content Creation

EventRewardChannel
Gameplay clip25 LTZ#clips
Featured clip (selected by mods)100 LTZ
Guide/tutorial200 LTZ#guides

Role-Based Multipliers

RoleEffectHow to Earn
RookieBase rewardsJoin server
Regular1.1x multiplier1,000 LTZ earned
Veteran1.25x multiplier5,000 LTZ earned
Elite1.5x multiplier15,000 LTZ earned
Legend2x multiplier50,000 LTZ earned

Sample Perks

PerkCostDescription
Custom role color500 LTZChoose your name color
Voice priority1,000 LTZPriority speaker in events
Private voice channel (1 week)2,500 LTZTemporary private channel
Game code giveaway entry1,500 LTZEnter prize drawings
Exclusive emote access3,000 LTZUse server custom emotes
VIP lounge access10,000 LTZPermanent VIP channel access

Sample Monthly Budget (500 Active Members)

CategoryEst. TriggersLTZ/moUSD Equiv
Join bonuses100 new10,000$10.00
Daily check-ins8,000200,000$200.00
Voice rewards5,00075,000$75.00
Level-ups50025,000$25.00
Events20015,000$15.00
Content1005,000$5.00
Total~330,000~$330

Sample Program 3: E-commerce Brand Community

Philosophy: Convert Discord engagement into purchase behavior. Reward brand advocacy, product knowledge, and cross-platform engagement.

Program Goals
  1. Drive product discovery and education
  2. Reward brand ambassadors
  3. Create exclusive deals for community
  4. Build repeat purchase habits

Welcome Flow

EventRewardRequirement
Server join50 LTZ/join command
Link account (email verification)100 LTZConnect Discord to store account
Complete profile25 LTZAdd avatar, bio

Daily Engagement

EventRewardNotes
Daily visit10 LTZStreak bonuses apply
Product question answered25 LTZHelp in #product-help
Style/review share50 LTZ#customer-photos

Product Knowledge

EventRewardChannel
Watch product video15 LTZ#product-demos
Complete product quiz50 LTZMonthly quiz events
Attend launch event100 LTZProduct launches

Brand Advocacy

EventRewardValidation
UGC photo with product75 LTZMod approved
Product review (on-site)100 LTZVerified purchase
Social media share50 LTZScreenshot proof
Referral (friend joins)150 LTZFriend completes onboarding

Feedback & Support

EventRewardChannel
Product feedback50 LTZ#feedback
Feature request75 LTZ#suggestions
Issue report100 LTZ#support

Flash Sales & Exclusives

EventRewardAccess
Flash sale participation25 LTZ#flash-sales
Early access purchase200 LTZMembers only

Role-Based Perks

RoleRequirementBenefits
MemberJoinBase access
Fan500 LTZ5% discount code
Advocate2,500 LTZ10% discount + early access
Ambassador10,000 LTZ15% discount + free shipping
VIP25,000 LTZ20% discount + exclusive products

Perks Catalog

PerkCostValue
$5 store credit5,000 LTZ$5
Free shipping code2,500 LTZ~$8 value
Exclusive product access7,500 LTZLimited items
Mystery box entry3,000 LTZGiveaway entry
1-on-1 styling session15,000 LTZPersonal consultation
Brand ambassador kit50,000 LTZProducts + swag

Sample Monthly Budget (1,000 Members)

CategoryEst. TriggersLTZ/moUSD Equiv
Welcome flow50 new8,750$8.75
Daily engagement15,000150,000$150.00
Product knowledge2007,000$7.00
Brand advocacy1008,750$8.75
Flash sales50012,500$12.50
Total~187,000~$187

Implementing Your Program

  1. Choose your template - Select the sample program closest to your community type
  2. Customize rewards - Adjust LTZ amounts based on your budget and goals
  3. Configure in Partner Portal - Set up events in Automation and channels in Integrations → Discord
  4. Test with small group - Run a pilot with trusted members
  5. Launch and iterate - Monitor engagement and adjust

Program Design Tips

Balance Quality vs. Quantity
  • Quality-gated rewards (mod approved) = higher LTZ, prevents spam
  • Automatic rewards (streaks, voice time) = lower LTZ, drives daily engagement
  • Mix both for a healthy program
Set Appropriate Caps
  • Daily caps prevent farming
  • Weekly caps encourage consistent participation
  • Monthly caps reward depth over volume
Create Clear Progression
  • Quick wins (< 500 LTZ) = First-day achievable
  • Medium goals (1,000-5,000 LTZ) = Weekly targets
  • Long-term rewards (10,000+ LTZ) = Monthly aspirations

Additional Resources