Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

DSharpPlus/Xamarin-Bot

Repository files navigation

DSharpPlus Example Xamarin Bot

This is an example DSharpPlus bot, based on Xamarin.Android.

This is a very basic bot, but it should give you a good idea of where to start.

How to run the bot?

In order to run the bot, you must first create an application for it, build the bot, then configure it.

Create the application

  1. Go to my applications page on Discord Developer portal.
  2. Press the new app button.
  3. New app page will open. Enter your bot's name in the app name field (1), and its description in the description field (2).
    • You can optionally give it an avatar by pressing on the avatar button (3).
  4. When you're done, press the create app button.
  5. When the app is created, press the create bot user button.
  6. Once this is done, you will need to copy the bot's token. Under app bot user, there's a token field, press click to reveal and copy the resulting value.

Building the project and configuring the bot

  1. Open the project, and compile it in Debug mode.
  2. Install the app on your device.

Adding the bot to your server

  1. Go back to your app page, and copy your bot's client ID.
  2. Go to https://discordapp.com/oauth2/authorize?client_id=your_app_id_here&scope=bot&permissions=0.
  3. On the page, select your server (1), and press authorize (2).
  4. Done! You can now run the bot!

Running the bot

Now start DSharpPlus Example Xamarin Bot app on your device or from the debugger.

Where to now?

You might want to play around with the example, perhaps modify it a bit.

You can find the documentation for DSharpPlus over here.

If you want to get more help, join the unofficial Discord API server, and look for #dotnet_dsharpplus channel.

Also check out