Creating an Application, a Bot, and a Guild
In this lesson, you’ll create the components required before you can start writing some Python code. You need to first create these Discord components:
- An application
- A bot
- A guild
An application allows you to interact with Discord’s APIs, by providing authentication tokens, designating permissions, and so on. A bot user is one that listens to and automatically reacts to certain events and commands on Discord. A guild (or a server, as it is often called in Discord’s user interface) is a specific group of channels where users congregate to chat.
Once you’ve created all of these components, you’ll tie them together by registering your bot with your guild.
00:21 Once logged in, you should be sent to the application page by default, which is what you can see here. In order to create a new application, start by clicking on the New Application button, located in the top right of the screen, up here.
00:49 Well done. You have created a Discord application. On the resulting screen, you can see some of the information about your application. Keep in mind that an application is not limited just to bots.
01:02 Any program that has to interact with Discord APIs requires one. Bot-related APIs are just a subset of Discord’s total interface. That being said, as you were here, first and foremost, for creating a bot, navigate to the Bot tab on the left-hand navigation list.
This is a default setting. You can change it to whatever you want, but I’m changing it to
RealPythonTutorialBot. Very creative, I know. Make sure you click Save Changes at the bottom of the screen once it pops up.
02:13 The next component to create is a guild, which will allow your bot to interact with other users. A guild, also known as a server in Discord’s user interface, is a specific group of channels where users can congregate to chat, either by text or through a voice call.
02:28 Now, while these two terms are mostly interchangeable, the rest of this course will be primarily using guild, as this is what the APIs use. The term server will only be used if and when referring to the guild, within the graphical UI.
02:44 As an example, let’s say you created a guild as a place where you can discuss the latest Triple-A title to come out with your friends. To do this, you would start by creating a guild, and within that guild, you would then have different channels.
02:58 For example, General Discussion, where you can discuss the game in general, Spoilers, Beware!, where you can discuss certain plot points with less risk of spoiling it for others, Announcements, where you can post any game updates that users need to see, or you could even create a Rules channel, so that users can read them at any time.
03:27 To do this, navigate to the Discord homepage. It may be useful at this point to keep two different tabs open in your browser, one with discordapp.com/channels, and the other with the developer application page.
03:42 It’ll just save time a little bit later on. From here, you can view and add friends or send direct messages to other Discord users and guilds. Select the + icon to the left-hand side of the window in order to add a server.
04:09 You can Create From Scratch, or you can go Gaming Group, and it will give you these default text channels and voice channels, or you can go Friend Group, and it will give you a very similar list, Study Group, Hobby Group, Content Creator, if you are so inclined to try that.
Become a Member to join the conversation.