[DOC] How to Create / Setup a Discord bot with RAT 4

Trekkan

NomadSoft Owner/Developer
Staff member
Oct 11, 2011
3,500
173
63
52
Hillsboro, OR
www.nomadsoft.net
First, you need to create an application within Discord. You can use an existing app, but it is recommended you create a new app.

Go here: Discord API Docs for Bots and Developers

Log in, and click the "Create an application" box.

Type in an App name, it can be anything but it should be unique. This will also be the name that people will see your bot listed as in your server/channels.

Add anything to the description or app icon you want

Copy and paste the CLIENT ID somewhere

Click "Bot" on the left hand navigation

Set the Username field to whatever you want to call your bot

Under the "Privileged Gateway Intents" section, enable all three intents
1436

Click the "Reset Token" link next to the Token field under "App Bot User".
Click the "Yes, do it!" button.
Click the "Copy" button and paste the content somewhere as you cannot get the token again, only reset it.

Make sure "Public Bot" is unchecked
1437

Click Save Changes at the bottom of the screen

Check the permissions you want your bot to have. Typically you'd only need "Send Messages" and "Read Messages/View Channels", however I recommend the settings as shown below.

1438

Once you've checked the permissions you want your bot to have, copy the value in "Permissions Integer" somewhere. Checking these boxes doesn't actually give your bot any permissions, it just generates the number. You use that number next.

You've now created your first bot and user. =)

Now you need to authorize this new bot to join your server.

Code:
https://discordapp.com/api/oauth2/authorize?client_id=YOURCLIENTID&scope=bot&permissions=YOURPERMISSIONSNUMBER

Edit the above URL before going there in a browser:

Replace YOURCLIENTID with the client ID you cut/pasted earlier.
Replace YOURPERMISSIONSNUMBER with the Permissions Number you cut/pasted earlier.

Go there in any browser. You only need to do this once, or if you somehow unauthorize the bot.

You will get a popup where you need to select the server you want to add the bot. Now click the "Continue" button.
1439

You will then see another popup displaying the permissions you are allowing the bot to have:
1440

Click the "Authorize" button.

Now, in RAT, click the Settings button, and select the Discord tab.

1441

Check Enable Bot
Enter your bot name
Enter the bot token, this is one of the values you saved while creating the bot.
Leave "Auto Connect" disabled, until you're sure the bot works.

Click Test Connection

If everything is ok, the lights will go green, at which point you are good to enable 'Auto Connect'. If not, please review these instructions again.
1443

Close the Settings window in RAT(Don't forget to save!), and then click the "Discord Status" button on the main RAT toolbar window, to connect your bot (if it isn't already) to your Discord server.
1444
 
Last edited:
Thanks Trakkan.. it was a little tuff at first but stumbled around and did it hahahaha .. Were you put edit in the URL (with your client id were I have it marked) before sending it in the browser .. just to be clear a lot of us have never done it before.. Your doing Hell of a Job Thanks Again all Green light first try
 
Last edited: