Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
discord [2018/06/07 01:39]
sgtbatten
discord [2019/06/08 22:26] (current)
armchairguru
Line 1: Line 1:
 ===== Discord Server & Bot Creation ===== ===== Discord Server & Bot Creation =====
- +<callout type="​success"​ icon="​glyphicon glyphicon-flag">​ 
-This is a supplementary guide to the [[Notification Setup#​Notifications Guide]]+This is a supplementary guide to the [[Notification Setup#​Notifications Guide]].
  
 Create a Discord [[Discord#​Create a Discord Server|Server]] or [[Discord#​Create a Discord Bot|Bot]] by following the instructions below. Create a Discord [[Discord#​Create a Discord Server|Server]] or [[Discord#​Create a Discord Bot|Bot]] by following the instructions below.
- +</​callout>​
-----+
  
 === Create a Discord Server === === Create a Discord Server ===
  
 1. Click the + icon at the bottom of the discord server list on the left side of the discord window.\\ 1. Click the + icon at the bottom of the discord server list on the left side of the discord window.\\
-{{:​discord_new_server_button.png|}}+{{:​discord_new_server_button.png|}}\\ 
 + 
 +\\
  
 2. Next, click the '​Create Server'​ button\\ 2. Next, click the '​Create Server'​ button\\
-{{:​discord_create_server.png|}}+{{:​discord_create_server.png|}}\\ 
 + 
 +\\
  
 3. Name your server and create it 3. Name your server and create it
 +
 +\\
  
 ---- ----
  
 === Create a Discord Bot === === Create a Discord Bot ===
 +
 + ​**Note** - When creating a bot for standard messaging sent from ProfitTrailer through the application properties settings, discord.chat_1 is the actual channel name (i.e.- my-botchannel),​ NOT the numeric channel ID described for PTNotifications (PRO)
 +
 \\ \\
 +
 1. Visit this link to start the creation process [[https://​discordapp.com/​developers/​applications/​me]] 1. Visit this link to start the creation process [[https://​discordapp.com/​developers/​applications/​me]]
  
-2. Click on the 'New App' ​button.\\ +2. Click on 'Create an Application'.\\ 
-{{:discordapp_newapp_button.png|}}+{{:Discord_create_app.png|}}\\ 
 + 
 +\\ 
 +\\
  
 3. Give the app a name, it is the name that will be the bot's name in your discord, after creation.\\ 3. Give the app a name, it is the name that will be the bot's name in your discord, after creation.\\
-{{:discord_newapp_name.png|}}+{{:Discord_rename_bot.png|}}\\
  
-4. Optionally, you can create a description and give the app (bot) an icon to use, this is where those two items are added, when you are finished, click '​Create App'.\\ +\\ 
-{{:​discord_newapp_create.png|}}+\\
  
-5Scroll down the page and find the 'Create a Bot User' ​button, you will need to add a bot user.\\ +4At the bottom of the page, click on 'Save Changes'.\\ 
-{{:discord_bot_create_bot_user.png|}}+{{:Discord_save_changes.png|}}
  
-6. Once the bot user is created, click on the 'Click to Reveal'​ link beside Token.\\ +**(Note:** The button may not appear unless any changes are actually made to the page !)
-{{:​discord_bot_token_location.png|}}+
  
-7. Save this bot token as it is the token needed for the discord_bot_token setting in the settings.properties file for PTNotifications;​ and optionally, if not using notifications,​ it is also for the [[application.properties#​discord.bot_token_1]] setting in the ProfitTrailer application.properties file.+\\ 
 +\\
  
-8Visit this link to invite your bot to your discord server[[https://​discordapp.com/​oauth2/​authorize?&​client_id=YOUR_CLIENT_ID_HERE&​scope=bot&​permissions=0]]\\+5On the left side menu, click on the '​Bot'​ tab.\\ 
 +{{:Discord_menu_bot_tab.png|}}\\
  
-**Note:** You will need to replace **YOUR_CLIENT_ID_HERE** in the link with your bot's Client ID, which can be found at the top of the bot app page. If this is confusing, simply open the link in a new browser tab or window and edit in the address bar to include your Client ID, then press enter to follow the corrected link.\\ +\\ 
-{{:​discord_client_id.png|}}+\\
  
-9After adding your Client ID to the link and following it, you should see a screen with a similar image to the below.\\ +6Click on 'Add Bot'.\\ 
-{{:discord_invite_bot.png|}}+{{:Discord_add_bot.png|}}\\
  
-10. Now select your server in the dropdown, then click "​Authorize"​.+\\ 
 +\\
  
-11Once your bot is invited ​to your discord server, you will need to enter the appropriate information into the settings.properties file for PTNotifications.\\ +7Turn off the public join option so only you will be able to invite ​your bot to your discord server.\\ 
-  * discord_bot_token = this is the bot token mentioned above in steps 6 and 7. +{{:​Discord_turn_off_join.png|}}\\
-  * discord_channel_id = this is the numeric channel id for the discord channel in which your bot will send messages.+
  
-12. To find the numeric channel id for your channel, enable developer mode on discord by clicking the settings cog beside your username at the lower left hand side of the discord app.\\ +\\ 
-{{:​discord_dev_1.png|}}+\\
  
-13Click on 'Appearance'​ and find developer mode and switch it on.\\ +8You can set permissions now, or you can set them later in discord by changing the permissions of the bot's user role in the discord server settings 
-{{:​discord_dev_2.png|}}+\\ 
 +\\
  
-14Right click the channel name and click on 'Copy ID'.\\ +9Find your bot token, which is used for the discord_bot_token setting in the application.properties file by clicking ​on 'Reveal Token' ​at the top of the bot page.\\ 
-{{:discord_channel_id.png|}}+{{:Discord_reveal_token.png|}}\\
  
-**Notes:**  +\\ 
-  - This is only an example, you will use the channel on YOUR discord server to which you want the bot to send messages. +\\ 
-  ​- In the ProfitTrailer [[application.properties]] file''​[[application.properties#discord.chat_1]]''​ is the actual ​channel name, NOT the numeric channel ​ID described above for PTNotifications ([[PRO_Features#​PRO]])+ 
 +10. Save this bot token as it is the token needed for the discord_bot_token setting in the settings.properties file for PTNotifications;​ and optionally, if not using notifications,​ it is also for the [[application.properties#​discord.bot_token_1]] setting in the ProfitTrailer application.properties file.\\ 
 + 
 +\\ 
 +\\ 
 + 
 +11. Visit this link to invite your bot to your discord server.\\ 
 +[[https://​discordapp.com/​oauth2/​authorize?&​client_id=YOUR_CLIENT_ID_HERE&​scope=bot&​permissions=0]]\\ 
 + 
 +\\ 
 +\\ 
 + 
 +**Note:** You will need to replace **YOUR_CLIENT_ID_HERE** in the link with your bot's Client ID, which can be found by going to the left menu > '​General'​ Tab, it is located at the top of the page.\\ 
 +{{:​Discord_general_tab.png|}}\\ 
 +{{:​Discord_client_id.png|}}\\ 
 + 
 +\\ 
 +\\ 
 + 
 +If this is confusing, simply open the link in a new browser tab or window and edit in the address bar to include **your Client ID**, then press enter to follow the corrected link.\\ 
 + 
 +\\ 
 +\\ 
 + 
 +12. After adding your Client ID to the link and following it, you should see a screen with a similar image to the below.\\ 
 +{{:​discord_invite_bot.png|}}\\ 
 + 
 +\\ 
 +\\ 
 + 
 +13. Now select your server in the dropdown, then click "​Authorize"​.\\ 
 + 
 +\\ 
 +\\ 
 + 
 +14. Once your bot is invited to your discord server, you will need to enter the appropriate information into the appropriate settings location.\\ 
 +**If you use the PT Notifications addon, do not use the settings for direct notifications or you will receive double ​messages.** 
 + 
 +\\ 
 + 
 +The ''​settings.properties''​ file is for the PTNotifications addon.\\ 
 +  ​* ''​discord_bot_token =''​ this is the bot token mentioned above in steps 6 and 7. 
 +  * ''​discord_channel_id =''​ this is the numeric channel id for the discord channel in which your bot will send messages. 
 + 
 +\\ 
 + 
 +The application ​properties file is for direct notifications from ProfitTrailer.\\ 
 +  * ''​discord.bot_token_1 =''​ this is the bot token mentioned above in steps 6 and 7. 
 +  * ''​discord.chat_1 ​='' ​this is the discord ​channel name (Note: use channel ​not #channel) 
 +  * ''​discord.new_signal_notification =''​ Set to true to enable a notification to be sent when a new message is received 
 +  * ''​discord.new_signal_notification_channel =''​ Set a separate channel for new message notifications to be sent to. 
 +    * Optional: If nothing is set ''​discord.chat_1''​ will be used instead. 
 + 
 +\\ 
 +\\ 
 + 
 +15. **For PT Notifications only:**\\ 
 +To find the numeric channel ​id for your channel, enable developer mode on discord by clicking the settings cog beside your username at the lower left hand side of the discord app.\\ 
 +{{:​discord_dev_1.png|}}\\ 
 + 
 +\\ 
 +\\ 
 + 
 +16. Click on '​Appearance'​ and find developer mode and switch it on.\\ 
 +{{:​discord_dev_2.png|}}\\ 
 + 
 +\\ 
 +\\ 
 + 
 +17. Right click the channel name and click on 'Copy ID'​.\\ 
 +{{:​discord_channel_id.png|}}
  • discord.1528335567.txt.gz
  • Last modified: 14 months ago
  • by sgtbatten