Skip to content

The modern and fully customizable C# Discord library.

License

Notifications You must be signed in to change notification settings

bakirov-eldar/NetCord

 
 

Repository files navigation

Logo

The modern and fully customizable C# Discord library

⭐ If you like this project, please consider giving it a star! ⭐

Table of Contents

  1. 📦 Installation
  2. 🚀 Example
  3. 🎨 Features
  4. 🥅 Goals
  5. 📚 Guides
  6. 📄 Documentation
  7. 🩹 Support
  8. 📜 License

1. 📦 Installation

You can install NetCord packages via NuGet package manager:

Package Description
NetCord Core package with fundamental functionality.
NetCord.Services Facilitates seamless handling of commands and interactions.
NetCord.Hosting Provides .NET Generic Host extensions for the NetCord package.
NetCord.Hosting.Services Provides .NET Generic Host extensions for the NetCord.Services package.
NetCord.Hosting.AspNetCore Provides ASP.NET Core extensions for seamless handling of HTTP interactions.

2. 🚀 Example

This snippet showcases a Discord bot with a minimal API-style /ping command responding with Pong!.

Usings omitted for readability, click here to show
using Microsoft.Extensions.Hosting;

using NetCord;
using NetCord.Services.ApplicationCommands;
using NetCord.Hosting.Gateway;
using NetCord.Hosting.Services.ApplicationCommands;
var builder = Host.CreateDefaultBuilder(args)
    .UseDiscordGateway()
    .UseApplicationCommands<SlashCommandInteraction, SlashCommandContext>();

var host = builder.Build()
    .AddSlashCommand<SlashCommandContext>("ping", "Ping!", () => "Pong!")
    .UseGatewayEventHandlers();

await host.RunAsync();

3. 🎨 Features

  • Fully customizable - NetCord is fully customizable and extensible
  • Easy to use - NetCord is easy to use and understand
  • Lightweight - NetCord is lightweight and performant
  • Asynchronous - NetCord is fully asynchronous and concurrent
  • AOT-ready - NetCord supports Native AOT compilation
  • Immutable - NetCord's caching is immutable by default
  • Voice-ready - NetCord supports both sending and receiving voice
  • Comprehensive - NetCord covers the entire Discord API and more

4. 🥅 Goals

NetCord's goal is to allow .NET developers to create fully customizable Discord bots without fighting the API wrapper itself. NetCord is designed to be easy to use and fully customizable, while still being lightweight and performant.

5. 📚 Guides

6. 📄 Documentation

7. 🩹 Support

Discord

8. 📜 License

This repository is released under the MIT License.

About

The modern and fully customizable C# Discord library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%