Creating a Bot Account
Create an Application
You can also use discords official getting started tutorial till step 2.
You'll then be prompted to enter a name for your application.
The name of your application will be the name displayed to users when they add your bot to their Discord server.
With that in mind, it would be a good idea for your application name to match the desired name of your bot.
After you hit
Create, you'll be taken to the application page for your newly created application.
That was easy, wasn't it?
Before you move on, you may want to upload an icon for your application and provide a short description of what your bot will do. As with the name of your application, the application icon and description will be displayed to users when adding your bot.
Using Your Bot Account
Invite Your Bot
Now that you have a bot account, you'll probably want to invite it to a server!
A bot account joins a server through a special invite link that'll take users through the OAuth2 flow;
you'll probably be familiar with this if you've ever added a public Discord bot to a server.
To get the invite link for your bot, head on over to the
OAuth2 page of your application and select the
URL Generator page.
We'll be using the *OAuth2 URL Generator* on this page.
Simply tick `bot` under the *scopes* panel; your bot invite link will be generated directly below.
By default, the generated link will not grant any permissions to your bot when it joins a new server.
If your bot requires specific permissions to function, you'd select them in the *bot permissions* panel.
The invite link in the scopes panel will update each time you change the permissions.
Be sure to copy it again after any changes!
Get Bot Token
Instead of logging in to Discord with a username and password, bot accounts use a long string called a token to authenticate. You'll want to retrieve the token for your bot account so you can use it with DisCatSharp.
Head back to the bot page and click on
Reset Token just below the bot's username field.
Yes, do it! to confirm the reset.
Go ahead and copy your bot token and save it somewhere. You'll be using it soon!
Handle your bot token with care! Anyone who has your token will have access to your bot account. Be sure to store it in a secure location and never give it to anybody.
If you ever believe your token has been compromised, be sure to hit the
Reset Token button (as seen above) to invalidate your old token and get a brand new token.
Write Some Code
You've got a bot account set up and a token ready for use.
Sounds like it's time for you to write your first bot!
This page was last modified at
07/05/2023 04:51:04 (UTC).
Author: Lala Sabathil <[email protected]> Commit: 651dfef64ee8506d6ed829662d1b85abe5385999
feat: sentry & various features / fixes (#287) * feat: lib dev rework * feat: use discordjson deser to find new fields * feat!: Rename ApiObject to ObservableApiObject * fix: grant extension access to internals * chore: net7 cleanup * feat: sentry release * feat: guild_id for integration * fix: ignore guild_hashes and hashes on channel * feat: allow devs to give their contact data for se...