This is a tutorial on making a staff application.
#How to create a application for discord update
As such, a local path to the image is required (i.e., /config/and updating an image after sending it in a message will not update the message in Discord.Discord Server: Making a Staff Application Guide and Info Images are uploaded to Discord when a message is sent. To use notifications effectively, please see the getting started with automation page. To get the user ID right click on the user name to copy the ID like you did for the channel ID up above.įor more information about creating and authorizing bots, visit the OAuth2 information page You can tag any user inside a channel by using their user ID in the message like so: replacing userid with the ID you copied. service : notify.discord data : message : " " target : data : embed : title : ' title' description : ' description' url : ' ' color : 199363 author : name : ' Author Home Assistant' url : ' ' icon_url : ' ' footer : text : ' Footer Text' icon_url : ' ' thumbnail : url : ' ' image : url : ' ' fields : - name : ' fieldname1' value : ' valuename1' inline : false - name : ' fieldname2' value : ' valuename2' - name : ' fieldname3' value : ' valuename3' - name : ' fieldname4' value : ' valuename4' inline : false Notes name and value are required, inline is true by default. Sets the thumbnail for the embed content.Īdds a field to the embed object.
#How to create a application for discord code
To include messages with embedding, use these attributes underneath the embed key: AttributeĬolor code of the embed. NOTE: if using embed, message is still required.
The following attributes can be placed inside the data key of the service call for extended functionality: AttributeĪrray of Discord embeds. Enter the hidden Token of your bot to link your Discord integration to the bot you created and allow Home Assistant to send messages as that bot. When adding the Discord integration you will be asked for an API Key. If the above My button doesn’t work, you can also perform the following stepsįrom the configuration menu select: Devices & Services.įrom the list, search and select “Discord”.įollow the instruction on screen to complete the set up.
Add Discord integration to Home Assistant ConfigurationĪdding Discord to your Home Assistant instance can be done via the user Multiple channel or user IDs can be specified, across multiple servers or direct messages. This channel or a user ID has to be used as the target when calling the notification service. Right click channel name and copy the channel ID ( Copy ID). In The Discord application go to Settings > Advanced > Enable Developer Mode. Once the bot has been added to your server, get the channel ID of the channel you want the bot to operate in. Wait for the confirmation which should say “Authorized”. Now use the Discord Authorization page with the Application ID of your application. To add the bot to a server you are an admin on use the Application ID you noted above, found on the Discord My Apps page.
Setting up the botīots can send messages to servers and users or attach locally available images. For example: if you enter “Discord Chat”, the service will be named notify.discord_chat. The name you give your application on the Discord My Apps page will determine the name of the notify service.