Reference
Configuring ccDiscordWrapper​
Before using ccDiscordWrapper, you need to configure the settings based on your preferred module (Discord Bot or Discord Webhook) in the env.js
file. Here's how you can do it:
Using Discord Bot Module​
- In the
env.js
file, ensure that the variablesv_config.Discord_Token
is set to your Discord Bot's token. - Set
sv_config.Discord_Token
in theenv.js
file to the Discord Bot Token obtained from the Discord Developer Portal.
Using Discord Webhook Module​
- In the
env.js
file, ensure that the variablesv_config.Discord_Token
is set to the Discord Webhook URL. - Set
sv_config.Discord_Token
in theenv.js
file to the Discord Webhook URL where you want to send the messages.
Note: Only use one of the modules at a time (either Discord Bot or Discord Webhook) to avoid conflicts.
Explaining the config.jsonc
File​
The config.jsonc
file contains configurations for different modules of ccDiscordWrapper. Here's a breakdown of the sections and their purpose:
General:
IsServerUsingESX
andIsServerUsingQBCore
: Flags indicating whether your server is using ESX or QBCore.appID
: Discord Application ID. You can find this on the Discord Developer Portal (https://discord.com/developers/applications).serverID
: Discord Server ID. You can find this by following these instructions (https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-).
DiscordBot:
enabled
: Set totrue
to enable the Discord Bot module, orfalse
to disable it.PlayerStatus
: Configurations related to the player status message and channel.enabled
: Set totrue
to enable the player status message, orfalse
to disable it.channelID
: The Channel ID where player status messages will be sent to.channelCountID
: The Channel ID where the name will be updated with the current player count (set tofalse
to disable).listPlayers
: Set totrue
to show individual players in the status message, orfalse
to only show the total player count.embedConfig
: Additional configurations for the embed message.title
: Title of the embed message.url
: URL of the embed message.thumbnail
: Thumbnail image URL for the embed message.
DiscordRPC:
enabled
: Set totrue
to enable the Discord Rich Presence module, orfalse
to disable it.assetLarge
: Large asset name for Discord Rich Presence. You can find this on the Discord Developer Portal (https://discord.com/developers/applications).textLarge
: Text that appears on hover over the large asset.assetSmall
: Small asset name for Discord Rich Presence. You can find this on the Discord Developer Portal (https://discord.com/developers/applications).textSmall
: Text that appears on hover over the small asset.actions
: Configurations for Discord Rich Presence actions.enabled
: Set totrue
to enable actions, orfalse
to disable them.action1
andaction2
: Configuration for each action, including the action name and URL.
supportChecker and versionChecker:
- Set to
true
to enable the support checker and version checker, orfalse
to disable them.
- Set to
Ensure to modify the values in the config.jsonc
file as per your server's requirements.