Python Forum

Full Version: How to write a Discord bot in Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In this tutorial, you'll learn to create a simple Discord bot with Python.
In case you don't know what Discord is, it is a Slack-like service aimed at gamers essentially.

In Discord, you can join multiple servers, and you must have noticed that these servers have many bots.
These bots can do a lot of things, from playing music for you to simple chat moderations.
I was really fascinated by these bots, so I decided to write one of my own using Python.
So, let's jump right in!

SET UP

Let's first create out bot's account.
Head over to https://discordapp.com/developers/applications/me and create a new app.
Give your bot a fancy name and give it a profile picture.
[Image: k2x64m]
Scroll down and click on "Create Bot User".
Once done, you can get the secret bot token.
[Image: k2x6e9]
And now you can click to reveal bot toke.
[Image: k2x6nw]

NEVER share this token with anyone, because with they can hijack your bot.
Soon after writing this I will change the token.

Main article source : Boostlog