

net core installed(at this time I believe it's 2.2). I'm going to assume that if you're following this tutorial you have an editor(such as VS or VS Code, etc) and have the latest stable version of. Okay, now, to add the bot to your discord server(you must have the Manage Server permission to add a bot), change the CLIENTIDHERE in the following url then visit it in your browser whilst logged into discord. Keep this page around, you'll need the Token from the bot page as well as the client ID and token from the General Information page a little later. Here you can set your bots username and profile picture. Hit Add Bot and hit yes when it asks you to confirm. You'll now have a mostly blank page that has the option to add a bot to this application. Feel free to do this, then on the left-hand menu, click the "Bot" link. You'll now be presented with a page where you can edit your applications name and description. So, to use create a bot, we must first head over to the Discord developer portal and create an app.Ĭlick the New Application button and give your app a name(you'll be able to set your bots nickname and avatar image later, for now just name it what you'd like and hit Create). This is useful when you have a command that might take a little while, because the "Typing." indicator shows the users that your bot has received the command and is processing the result. The reason I like DSharpPlus is the interactive library allowing you to easily await input and reactions from users, as well as (and this is not really important, just something I like) the ease of sending a "Typing." message before the actual content. Discord.Net is a great library and it has its own pros and cons in comparison. So, first off, for those who have built discord bots with C# before, you might ask why I didn't elect to use Discord.Net (the more popular discord library). We'll be using reflection to automatically load module classes with your commands in them. Today I'll be showing you how to setup a basic Discord bot using C#.
