Set up Discord notifications with the discourse-chat-integration plugin

Discourse
Fri, 21 Jul 2017 15:04:04 +0000
Integrations

This guide explains how to configure Discord notifications for your Discourse forum using the discourse-chat-integration plugin. This plugin is included with Discourse — no separate installation is required.

Required user level: Administrator

Set up Discord webhook

1. Log into your Discord server

2. Click your server name and choose “Server Settings”

3. Click Integrations, then Webhooks. Then click Create Webhook

4. Choose a bot name, icon, and the Discord channel you want to post to

5. Copy the webhook URL, then click Save

Webhooks use these URL formats depending on your Discord client:

Standard Discord: https://discord.com/api/webhooks/

Public Test Build (PTB): https://ptb.discord.com/api/webhooks/

Canary: https://canary.discord.com/api/webhooks/

If using PTB or Canary, remove the ptb. or canary. part from the webhook URL before saving in Discourse.

Configure Discourse

1. In your site settings, enable chat integration enabled to activate the Chat Integration plugin, then enable chat integration discord enabled to activate the Discord provider

2. Go to the Plugins tab, then Chat Integrations. In the Discord section, click Create Channel

3. Enter a name for the channel (this is only displayed in the admin panel)

4. Paste the webhook URL that you copied earlier, then click Save Channel

5. Use the Test button on the channel you just created to verify everything is working. You should see something like this:

6. Set up notification rules for your channel following the discourse-chat-integration instructions

Customizing notifications

You can use the chat_integration_discord_message_content Discourse site setting to add a message before every notification. This can be used to:

Add custom text

Mention users or roles

Tag everyone with @everyone

Adding role mentions

To mention specific Discord roles in your notifications, you’ll need to use the format <@&Role_ID>. Here’s how to get a role’s ID:

1. Open Discord and click the User Settings icon at the bottom left of the screen

2. Search for “Developer” in the settings search bar or click App Settings > Advanced tab

3. Enable Developer Mode and return to your Discord server

4. Left click your server name

5. Navigate to Server Settings > Roles

6. Left-click the role you want to mention (e.g. @everyone) and select Copy Role ID

7. In your Discourse admin panel, add the role ID to your chat_integration_discord_message_content setting using this format:

<@&000000000>

(Replace 000000000 with the actual role ID you copied)

8. Save the changes and use the Test button to verify it works

To mention individual users instead of roles, use the format <@UserID>. You can get a user’s ID using the same Developer Mode steps above, but right-click the user and select Copy ID instead.

For example, setting the message content to include a role mention would look like:

Last edited by @jessii Thursday, February 13, 2025 7:00 PM UTC
Check document (clicca per ulteriori dettagli)

64 messaggi - 32 partecipanti