Installation

Dependencies

Bot Creation Tutorial

https://www.youtube.com/watch?v=FPkLZb6rA5M

Installation

  1. Download LuxuDiscordBot and extract it into your server's resources folder
  2. Rename the folder to luxudiscord — required for LuxuAdmin detection
  3. Create a Discord bot — see the Discord section below
  4. Open bot.lua and fill in all values — see the Discord section below
  5. Open Config.lua and configure all settings. Do not skip Config.Permissions — see Permissions

Add to server.cfg:

add_ace resource.luxudiscord command allow

Start resources in this order:

# ESX
ensure es_extended
# QBCore
ensure qb-core

ensure ox_lib
ensure LuxuModules
ensure LuxuDiscordBot
# If you have LuxuAdmin
ensure LuxuAdmin

Permissions

Get the role IDs from your Discord server:

Untitled

Config.lua — example giving admins full access and moderators limited access:

Full admin permissions:

Config.Permissions = {
      {
            name = "Admin",
            role_id = "1103798716227403880",
            fullpermission = true,
            tickets = true,
            commands = {}
      },

}

Specific commands for moderators:

Config.Permissions = {
      {
            name = "Admin",
            role_id = "1103798716227403880",
            fullpermission = true,
            tickets = true,
            commands = {}
      },
      {
            name = "Moderator",
            role_id = "1103794241553403880",
            fullpermission = false,
            tickets = true,
            commands = {
                  'playerlist',
                  'player',
                  'close',
                  'reportinfo',
                  'revive',
                  'kick',
                  'screenshot',
                  'online'
            }
      },

}

Discord

How to create a bot and get the values for bot.lua:

  1. Enable Developer Mode

    Untitled

  2. Create a new application at discord.com/developers/applications

    Untitled

    Untitled

Bot.lua

This is your CLIENT_ID:

Untitled

Enable these options:

Untitled

Invite Your Bot

Select the appropriate permissions:

Untitled

Your bot invite link:

Untitled

This is your DISCORD_TOKEN:

Untitled

GUILD_ID:

Untitled

Create a private category in your Discord server and copy its ID:

Untitled

Untitled

Untitled

LogWebhook:

Untitled

This is your LogWebhook:

Untitled

Tebex Secret

  1. Go to https://server.tebex.io/game-servers
  2. Click EDIT

Untitled

Update bot.lua

After collecting all values, update bot.lua:

Untitled