Skip to main content

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​

  1. In the env.js file, ensure that the variable sv_config.Discord_Token is set to your Discord Bot's token.
  2. Set sv_config.Discord_Token in the env.js file to the Discord Bot Token obtained from the Discord Developer Portal.

Using Discord Webhook Module​

  1. In the env.js file, ensure that the variable sv_config.Discord_Token is set to the Discord Webhook URL.
  2. Set sv_config.Discord_Token in the env.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:

  1. General:

  2. DiscordBot:

    • enabled: Set to true to enable the Discord Bot module, or false to disable it.
    • PlayerStatus: Configurations related to the player status message and channel.
      • enabled: Set to true to enable the player status message, or false 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 to false to disable).
      • listPlayers: Set to true to show individual players in the status message, or false 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.
  3. DiscordRPC:

    • enabled: Set to true to enable the Discord Rich Presence module, or false 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 to true to enable actions, or false to disable them.
      • action1 and action2: Configuration for each action, including the action name and URL.
  4. supportChecker and versionChecker:

    • Set to true to enable the support checker and version checker, or false to disable them.

Ensure to modify the values in the config.jsonc file as per your server's requirements.