Linking Discord Bot with the Code - AravinthSS07/Discord.Net-Bot GitHub Wiki

Now we'll link the Discord bot we created with code given in the repository

  1. Open Program.cs file

  1. In line 32 Replace the string ENTER YOUR BOT TOKEN HERE with your bots string that we copied in the previous steps

  1. Well that is all now you can run your bot but before that we have to add the bot to a server so now lets see how to do that

I. open Discord Developers Portal and open your application that you've made

II. Now open the OAuth2 Tab

III. Now in scope click on bot and in Bot Permission click Administrator

IV. Now copy the url generated and open it in your browser and add the Discord Bot

If you have any problems then you can create an issue and wait until someone responds to your Issue