Config

Configuration

The configuration is split into two files for security:

config.lua (general settings) and configserver.lua (sensitive tokens).

1. Server Configuration (configserver.lua)

Location:

mh_discordbot/configserver.lua This file contains sensitive data. NEVER share this file.

  • Config.DiscordToken: Your Discord Bot Token.

  • Config.GuildId: The ID of your Discord Server.

    • Enable Developer Mode in Discord (User Settings -> Advanced).

    • Right-click your server icon -> Copy ID.

Config = Config or {}-- Sensitivity Configuration - SERVER SIDE ONLYConfig.DiscordToken = 'YOUR_BOT_TOKEN_HERE' Config.GuildId = 'YOUR_GUILD_ID_HERE'

2. General Configuration (config.lua)

Location:

mh_discordbot/config.lua

Framework

Select your server framework.

Admin Groups

Define which in-game groups are considered admins (used for /admins command).

Ban Logs

Channel ID where ban logs will be sent.

Permissions (Config.Permissions)

Restrict commands to specific Discord Role IDs.

  • false: Command is public (or restrict via Discord integrations).

  • { 'ROLE_ID' }: Only users with this Role ID can use the command.

Example:

Commands (Config.Commands)

You can rename the slash commands here if needed.

Language (Config.Lang)

Translate or customize the bot's responses and embed messages.


Last updated