Discord

From GExtension Wiki
Jump to: navigation, search

Letting GExtension communicate with your discord guild requires you to create an application and add a bot to your guild.

Every user that wants to use the synchronization must set its discord username in the profile settings. This can be done at any time.

Setup

  1. Go to the Discord Developer Portal and create a new application. As name you can choose something like "GExtensionBot" or similar.
  2. After creating the application, navigate to the Bot tab and click the Add bot button.
  3. On your GExtension web-panel, navigate to Admin -> Settings -> Discord and insert the required data:
    1. The guild/server ID can be retrieved by following this guide.
    2. The application client ID can be found in the General information tab of the application that we just created.
    3. The bot token can be found in the Bot tab after clicking Click to Reveal Token.
  4. Click Save
  5. Add the bot to your server by clicking Add bot to guild
  6. A new role has been created in your guild, which has the same name as your bot. Go to Discord server settings -> Roles and move the role (e.g. "GExtensionBot") to the highest position.

If you did all steps correctly, you should now find your discord guild in the Servers section. You may need to enable widgets in the Discord server settings for the widget to work.

Roles

Roles can be given thourgh a reward of a donation package or as synchronization of a GExtension group. To establish a synchronization, follow these steps:

  1. Navigate to Admin -> Settings -> Groups -> Edit -> Discord Synchronization
  2. Insert the ID of the role for the group in the specified bundle. For example the ID for the role "TTT-Moderator" in the TTT bundle of the group Moderator.


The synchronization of a user will be checked on the following events:

  • Everytime the discord username was changed in the profile settings
  • Everytime the groups of the user were changed

FAQ

How do I get the ID of a role?

  • Go to any channel and send a message with the content "\@[RoleName]" with replacing [RoleName] with the name of the role. For example \@Moderator. You will get something like <@&552888644130701312>. In this case, 552888644130701312 is the desired role id. Please note: "Allow anyone to @mention this role" must be enabled on the targeted role for this process to work.