-
Notifications
You must be signed in to change notification settings - Fork 14
Installations
We suggest you be familiar with discord.py and python. This is a Ticket Bot guide so it couldn't contain a lot of python explanations.
We need to install the library discord.py
If you are using Windows, then the following should be used instead:
py -3 -m pip install -U discord.py
If you are using another operating system or virtual machine go to this site.
We need to install the library discord-components
pip install --upgrade discord-components
if the above command does not work try this:
py -m pip install --upgrade discord-components
⚠️ If you meet an errorNo matching distribution found for discord-components
when installing, try updating the python version! (It must be upper than 3.6)
Before you're able to create a bot account to interact with the Discord API, you'll need to create a new OAuth2 application. Go to the Discord Developer Portal and click New Application at the top right of the page.
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.
Enter your desired application name into the text box, then hit the Create
button.
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.
Now that you have an application created, you'll be able to add a brand new bot account to it.
Head on over to the bot page of your application by clicking on Bot
in the left panel.
From there, click on the Add Bot
button at the top right of the page.
Then confirm the creation of the bot account.
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.
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.
So make sure you give Administrator
permission to the bot.
Head back to the bot page and click on Click to Reveal Token
just above the Copy
and Regenerate
buttons to take a peek at your token.
⚠️ 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 Regenerate button (as seen above) to invalidate your old token and get a brand new token.