https://github.com/Quahu/Disqord
Asynchronous Discord API wrapper and bot framework for .NET.
https://github.com/Quahu/Disqord
asynchronous bot-framework csharp csharp-library discord discord-api discord-api-wrapper discord-bot discord-bot-framework discord-library disqord dotnet dotnet-core
Last synced: 8 months ago
JSON representation
Asynchronous Discord API wrapper and bot framework for .NET.
- Host: GitHub
- URL: https://github.com/Quahu/Disqord
- Owner: Quahu
- License: lgpl-3.0
- Created: 2019-02-08T03:26:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-24T23:55:01.000Z (about 1 year ago)
- Last Synced: 2024-10-30T04:50:17.961Z (about 1 year ago)
- Topics: asynchronous, bot-framework, csharp, csharp-library, discord, discord-api, discord-api-wrapper, discord-bot, discord-bot-framework, discord-library, disqord, dotnet, dotnet-core
- Language: C#
- Homepage: https://quahu.github.io/Disqord/
- Size: 8.12 MB
- Stars: 163
- Watchers: 9
- Forks: 23
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- discord-api-libs - Disqord - Asynchronous Discord API wrapper and bot framework for .NET. (Libraries / C#)
README
Disqord
An asynchronous Discord API wrapper for .NET that aims to make Discord bot development simple and enjoyable without needless boilerplate.
-
Designed around Microsoft's dependency injection abstractions
-
Integrates seamlessly with the Generic Host
-
Replaceable components, stateless REST, customizable caching, and more
[](https://github.com/Quahu/Disqord/actions/workflows/nightly.yml?branch=master)
[](https://www.nuget.org/packages/Disqord/)
[](https://www.myget.org/feed/disqord/package/nuget/Disqord)
[](https://discord.gg/eUMSXGZ)
## Installation
Stable builds are available on NuGet.
Nightly Disqord builds can be pulled as NuGet packages from the MyGet feed: `https://www.myget.org/F/disqord/api/v3/index.json`.
## Documentation
The Disqord documentation is available on [GitHub Pages](https://quahu.github.io/Disqord/).
## Examples
Explore examples of the library in the [/examples](https://github.com/Quahu/Disqord/tree/master/examples) folder, all of which are licensed under the MIT license.
## Minimal Example
Typing `?ping` or `@YourBot ping` in a channel will make the bot respond with `Pong!`.
```cs
using Disqord.Bot.Commands.Text;
using Disqord.Bot.Hosting;
using Microsoft.Extensions.Hosting;
using Qmmands;
using Qmmands.Text;
await Host.CreateDefaultBuilder()
.ConfigureDiscordBot((context, bot) =>
{
// We will use the configuration variable DISQORD_TOKEN for the bot token.
bot.Token = context.Configuration["DISQORD_TOKEN"];
bot.Prefixes = new[] { "?" };
})
.RunConsoleAsync();
public class ExampleModule : DiscordTextModuleBase
{
[TextCommand("ping")]
public IResult Ping()
{
return Response("Pong!");
}
}
```