Create a Discord web trigger
Set up Discord webtriggers for automated actions in Unity Version Control.
Read time 1 minuteLast updated 9 months ago
You can create a web trigger to connect Unity Version Control with Discord to receive notifications. The notification includes the information available to the specific trigger that you use.
Create a Discord Webhook
First, you need to choose which channel you want to receive notifications:
- Right-click on the channel and select Edit channel > Integrations.
- Select Create Webhook.
- Select the webhook that appears to expand it. You can change the name and channel if you need to.
- Select Copy Webhook URL.
Create the UVCS Webtrigger
You can then use the Discord Webhook URL to set up a webtrigger. For a complete list of the types of triggers you can use, refer to this list of triggers.
You need to use the string (instead of ) before the script path, followed by the Discord webhook:
webtrigger-discordwebtriggerwebtrigger-discord https://discordapp.com/api/webhooks/${channelId}/${token}Example Discord web triggers
This example uses an so that you get a notification when someone runs a check in operation:
after-ci> cm trigger make after-ci NotifyTeam-Ci "webtrigger-discord https://discord.com/api/webhooks/<channelId>/<token>" --server=localhost:8787
The following example uses an trigger so that you get a notification when anyone creates a new branch:
after-mkbranch> cm trigger make after-mkbranch NotifyTeam-Branch "webtrigger-discord https://discord.com/api/webhooks/<channelId>/<token>" --server=localhost:8787