$backend = New-PoshBotDiscordBackend -Configuration $backendConfig superman#1234), otherwise permissions will fail to resolve correctly. Note that with the Discord backend, Bot Admin names should be JUST the username, i.e. The following example script shows how to create a new Discord backend using the values create above. If desired, you can disable Developer Mode now.Paste the Server ID on your text editor for later.Open your Discord server, right-click on the server name, then select Copy ID.Go to Appearance and enable Developer Mode under the Advanced section, then close User Settings.In Discord, open your User Settings by clicking the Settings Cog next to your user name on the bottom.Follow these steps to find your Server ID: You will need the full Server ID (not the name) to continue. The channel will say a bot has joined the room, and you’ll see it on the right side menu under the list of members. You’ll know it worked if you open Discord in an app or in your browser and navigate to your server. That’ll take you to a website where you can tell Discord where to send your bot.Your URL should look something like this, but with your client ID and permissions integer in place of the ones added below:.In a new browser tab, go to the below link, replacing CLIENTID with the Client ID copied from the General Information page and PERMISSIONINTEGER with the Permission Integer copied in the last step:.Once you have your permissions selected, copy the Permissions Integer listed and paste it on your text editor for later.PoshBot will need at least the following permissions to run in Discord:.If you are testing, you can select Administrator ( 8).The bottom Bot Permissions section is where we can calculate the appropriate permissions integer to use when authorizing your Bot to your server shortly.Leave Requires OAuth2 Code Grant un-toggled.This will ensure that only you can join the Bot to servers. Recommended: Under Public Bot, click the purple toggle to disable making the bot publicly available. Copy the Token listed and paste it on your text editor for later Under Token, click the blue link to Click to Reveal Token.This is the username your Discord users will see. Set your Bot's username to something other than the application name, if desired.With your text editor still open, follow these steps: You will be placed on the Build-A-Bot page. On the left-hand menu, click the Bot section, then click the purple Add Bot button:Ħ. Copy the Client ID listed on this page to your text editor for laterĥ. You will be placed on the General Information page for your application. Provide a memorable name for your bot when prompted, then click the purple Create button on the bottom-right:Ĥ. Click the purple New Application button on the top-right of the page to create a new application:ģ.Open to view the Applications section on the Discord Developer Portal.Open a text editor to copy some information down as you follow these steps: If you do have one, log in to your account and open up the server in which you want your bot to live.įirst, you will need to create an application on Discord.If you haven’t created one yet, go to and create one.A Discord account and your own Discord server.Listing channels and users are also handled via REST. Responses are sent back to Discord via REST API call. The Discord backend works similar to Slack's messages are received from Discord via WebSocket constantly monitoring the channels that the bot has been added to.
0 Comments
Leave a Reply. |