+5 votes
67 views
in Create apps / software by (242k points)
reopened
Discord-Bot - this is how it works

1 Answer

+3 votes
by (1.6m points)
 
Best answer

What can a Discord bot do?
How do I use a Discord bot?
Can I program my own Discord bot?

Want to add a bot to your Discord server? We'll show you how to integrate and create bots..

image image

Whether as an administrative aid or a music player on command, a Discord bot can come in very handy. But first this has to be created and set up. Then you can add the bot to your server and you're ready to go. You can read how all of this works in this tipps + tricks article.

What can a Discord bot do?

Bots can perform all kinds of functions. They serve to optimize your Discord server and to offer the server members a nice experience. So your bot can automatically greet new users. There are also bots that can play music permanently or on request. Players also get their money's worth: If you want, you can even throw the dice on command in Discord with such a bot. The possibilities are endless - the only limitations are creativity and possibly programming skills.

How do I use a Discord bot?

In addition to the possibility of programming your own bot, you can always integrate a finished bot into Discord. It's a lot easier and much faster. There are a few websites, such as top.gg , that have lots of Discord bots. These were all programmed by the community and then uploaded there for the general public. All you have to do is use the search window at the top of the website and you have a wide range of bots to choose from.

Click on the bot you want to add. This takes you to a separate page. Here you have to " Invite Then click on the server to which this bot should be added. As soon as the authorization has been successfully completed, the bot is then integrated on your Discord server..

image
You can add a finished bot from top.gg to your server using the "Invite" button.

Can I program my own Discord bot?

Of course, it is also possible that you program a bot for your Discord server yourself. However, you must have the necessary knowledge to do this. If you know how to use JavaScript and Python, you've already taken the first step. Then you need to create an application in Discord. This can be done easily via " New Application " in the Discord Developer Portal .

image
You can create a new bot via "New Application".

After creating this file, you'll need to set up the bot. To do this, click on " OAuth2 " on the left and make the necessary settings. You will then

https://discordapp.com/oauth2/authorize?&client_id=IHRE-ID&scope=bot&permission=8

see the following authentication link below: Instead of "YOUR ID" you will see the bot's client ID. You can use " Copy " to copy them and paste them into the browser. Then select the Discord server that you want to add the bot to..

image
You can set up the bot in the "OAuth2" area. You will find the identification link below.

You can then write the code you want for your bot in JavaScript. Regardless of whether it is a game aid or a music player - the choice is yours. Then copy the finished code into the prompt in Discord for your bot. Now you can start the bot.


...