Discord is a popular communications app used by gamers to communicate online. It lets you share voice, video, and text chat with friends, game communities, and developers.
Find the open source transformer code for this destination in the GitHub repository.
Once you have confirmed that the source platform supports sending events to Discord, follow these steps:
From your RudderStack dashboard, add the source. Then, from the list of destinations, select Discord.
Assign a name to the destination and click Continue.
Connection settings
To successfully configure Discord as a destination, you need to configure the following settings:
Identify Template: Enter a template for building a text message while sending an identify call to Discord. If not provided, RudderStack uses User {{name}} with {{traits}} is identified as the default template.
Event Name: Enter the event name for which RudderStack should trigger the track call’s event template.
Event Template: Enter a template for building a text message while sending a track call to Discord. If not provided, RudderStack uses User {{name}} did {{event}} with {{properties}} as the default template.
Regex Matching: Enable this setting if you want to match multiple event names in the track call using a regex. It helps in setting the same event template for the event names matching the regex.
Embed Flag: Enable this setting to set an embed message for Discord. If enabled, also specify the following:
Title Template: Enter the template for building the title of the embed message. If not provided, RudderStack uses Identify/Track call made as the default title.
Description Template: Enter the template for building the description of the embed message. If not provided, RudderStack uses Message from RudderStack as the default description.
Webhook Url: Enter the webhook URL of the Discord channel where you want to send the data. You can create it by logging in to Discord, selecting the channel, and going to the Channel settings > Integrations > Create Webhook.
Trait: Enter all traits you want to send to Discord in the text message.
Identify
You can use the identify call to create or update a user in Discord.
Either one of the userId or anonymousId is required to make an identify call successfully.
RudderStack sends the above identify call to Discord in the following text message format (using the default identify template):
User Alex Keener with email: alex@example.com, country: USA is identified
When the Embed Flag setting is enabled and the default values for Title Template and Description Template are used:
"content":"User Alex Keener with email: alex@example.com, country: USA is identified","embeds":[{"description":"Identify call made","title":"Message from Rudderstack "}]
RudderStack sends the text message in the content property after converting it into the identify template specified in the dashboard. Also, if the Embed Flag setting is enabled, it sends the embed message details in the embeds property. Refer to the Discord documentation for more information.
Track
You can use the track call to capture user events along with the properties associated with them.
event name is a required property to make a track call successfully.
RudderStack sends the above track call to Discord in the following text message format (using the default track template):
Anonymous user anon_id did Order Completed with category: category, label: label, value: 120
When the Embed Flag setting is enabled and the default values for Title Template and Description Template are used:
"content":"Anonymous user anon_id did Order Completed with category: category, label: label, value: 120","embeds":[{"description":"Track call made","title":"Message from Rudderstack "}]
RudderStack sends the text message in content property after converting it into the track template specified in the Event Template dashboard setting. Also, if the Embed Flag setting is enabled, it sends the embed message details in the embeds property. Refer to the Discord documentation for more information.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.