All Projects → DSharpPlus → Example Bots

DSharpPlus / Example Bots

Licence: apache-2.0
An example bot directory for DiscordSharpPlus library. Contains C# and VB.NET examples.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Example Bots

Lenoxbot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 163 (+136.23%)
Mutual labels:  discord-api, bot, discord-bot
Smorebot
SmoreBot is a fun, lightweight, multipurpose bot packed with features.
Stars: ✭ 51 (-26.09%)
Mutual labels:  discord-api, bot, discord-bot
Discord-Bot-TypeScript-Template
Discord bot - A discord.js bot template written with TypeScript.
Stars: ✭ 86 (+24.64%)
Mutual labels:  example, discord-bot, discord-api
Music Bot
Simple music bot with a full-blown queue system that is easy to understand
Stars: ✭ 102 (+47.83%)
Mutual labels:  discord-api, bot, discord-bot
Discord Bot Client
A patched version of discord, with bot login support
Stars: ✭ 441 (+539.13%)
Mutual labels:  discord-api, bot, discord-bot
Discord Panel
📊 User friendly dashboard/tool for discord bot developpers to manage servers
Stars: ✭ 116 (+68.12%)
Mutual labels:  discord-api, bot, discord-bot
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+1310.14%)
Mutual labels:  discord-api, bot, discord-bot
Basicbot
A basic example of a Discord Bot written in Python. (discord.py)
Stars: ✭ 73 (+5.8%)
Mutual labels:  discord-api, bot, discord-bot
Commando
Official command framework for discord.js
Stars: ✭ 434 (+528.99%)
Mutual labels:  discord-api, bot, discord-bot
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (+433.33%)
Mutual labels:  discord-api, bot, discord-bot
Discord.js Menu
💬 Easily create Discord.js v12 embed menus with reactions and unlimited customizable pages.
Stars: ✭ 89 (+28.99%)
Mutual labels:  discord-api, bot, discord-bot
Deku
Multi-purpose discord bot built with discord.js
Stars: ✭ 13 (-81.16%)
Mutual labels:  discord-api, bot, discord-bot
Nino
🔨 Advanced and cute moderation discord bot as an entry of Discord's Hack Week!
Stars: ✭ 78 (+13.04%)
Mutual labels:  discord-api, bot, discord-bot
Discord.js
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
Stars: ✭ 16,432 (+23714.49%)
Mutual labels:  discord-api, bot, discord-bot
Bot
A Discord bot for all your needs. With memes, utilities, moderation & more, Fire is the only bot you'll need.
Stars: ✭ 79 (+14.49%)
Mutual labels:  discord-api, bot, discord-bot
Nostrum
Elixir Discord Library
Stars: ✭ 274 (+297.1%)
Mutual labels:  discord-api, bot, discord-bot
Xiao
Xiao is a Discord bot coded in JavaScript with discord.js using the Commando command framework. With over 500 commands, she is one of the most feature-rich bots out there. Formerly XiaoBot.
Stars: ✭ 302 (+337.68%)
Mutual labels:  discord-api, bot, discord-bot
Dsharpplus
A .NET Standard library for making bots using the Discord API.
Stars: ✭ 635 (+820.29%)
Mutual labels:  discord-api, bot, discord-bot
Modmail
A feature rich discord Modmail bot
Stars: ✭ 957 (+1286.96%)
Mutual labels:  discord-api, bot, discord-bot
Tsukibot
Discord CryptoBot for Spot Prices
Stars: ✭ 38 (-44.93%)
Mutual labels:  bot, discord-bot

Dependabot Status

DSharpPlus Example Bots

These are example bots for DSharpPlus library.

They are basic bots which are meant to introduce you to various aspects of the DSharpPlus library.

Example directory

  • Example 1: Introduces very basic bot skeleton. The bot simply connects to guilds, and prints some information to console.
  • Example 2: Introduces CommandsNext. This bot also responds to several commands, as well as presents several CNext concepts and examples of use.
  • Example 3: Introduces Interactivity. This bot has several commands that interact with the user in different ways. Presented are several examples of use.
  • Example 4: Introduces VoiceNext. This bot has the ability to connect to voice channels and play music in them. Presented is a simple bot that broadcasts audio from specified file in a queued manner.
  • Example 5: Demonstrates a bot with a Windows Forms UI. Presented is a way to run a bot without deadlocking the entire application, as well as properly dispatching the events to the UI.
  • Example 6: Demonstrates a bot with a Windows Presentation Foundation (WPF) UI. Presented is a way to run a bot without deadlocking the entire application, as well as properly dispatching the events to the UI.

Requirements

These projects were made using Visual Studio 2017, and they target .NET Core 3.1. You will need one of the following to open and build the projects:

You will also need to install .NET Core 3.1 SDK in both cases.

How to run the bot?

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

Create the application

  1. Go to Applications page on Discord Developer portal.
  2. Press the New Application button.
  3. New Application page will open. Enter your bot's name in the name field.
  4. When you're done, press the create button.
  5. When the app is created, jump to the bot section and press the add bot 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 copy the resulting value.

Building the project and configuring the bot

  1. Open the project, select the startup bot, and compile it.
  2. Go to <project path>, and copy the config.json file there.
  3. Now go to DSPlus.Examples.<language>.Ex0n (where n is the selected example), paste that file here.
  4. Open it with Notepad. Replace the placeholder values (do not remove the quotes) with your actual token and command prefix. Save it.
  5. Our bot is now configured, but we need to add it to our server first.

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. Verify that you are not a robot and you're done! You can now run the bot!

Running the bots

  1. Go back to the IDE and hit Debug.
  2. Congratulations! Your bot is running!

Note on WinForms and WPF examples

Windows Forms (WinForms), Windows Presentation Foundation (WPF), and Universal Windows Platform (UWP) are not officially supported ways of running your bot. These examples exist for educational purposes only.

We will not provide support for running bots through WinForms, WPF, UWP, or any other UI framework, especially non-asynchronous one.

If you require a non-console or non-Discord interface for your bot, consider an ASP.NET or ASP.NET Core application, as these at least offer support for asynchronous code.

Where to now?

You might want to play around with the examples, perhaps modify them 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].