Skip to content

Guilded-NET/Guilded.NET

early-access
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

Banner

🟑 Guilded.NET

Guilded.NET is a free and open-source unofficial API framework/library for Guilded written on .NET platform. It allows creating bots, webhooks and interacting any other way with Guilded API.

Version Version

πŸ“₯ Installing

Guilded.NET is available as a package on NuGet (or FuGet).

You can run this command to add Guilded.NET to an existing .NET project:

dotnet add package Guilded

Otherwise, you can install Guilded.NET templates and create new Guilded.NET projects:

dotnet new -i Guilded.Templates
dotnet new guilded.bot

βš™οΈ Using Guilded.NET

You can check out Guilded.NET's guide to get started on your bot. If you want to see everything that Guilded.NET offers, check out reference page.

It is recommended to use .NET 5 or above for Guilded.NET. While Guilded.NET supports .NET Core 3.0 or similar for now, this will change in the kind-of-late future.

πŸ“™ Example

Here's a quick example of Guilded.NET bot with !ping command:

// Program.cs
using System.Reactive.Linq;
using Guilded;

string auth   = "your_bots_auth_token",
       prefix = "!";

await using var client = new GuildedBotClient(auth);

client.Prepared
      .Subscribe(me =>
          Console.WriteLine("The bot is prepared!\nLogged in as \"{0}\" with the ID \"{1}\"", me.Name, me.Id)
      );

// Wait for !ping messages
client.MessageCreated
    .Where(msgCreated => msgCreated.Content == prefix + "ping")
    .Subscribe(async msgCreated =>
        await msgCreated.ReplyAsync("Pong!")
    );

await client.ConnectAsync();

// Don't close the program when the bot connects; not recommended to put code after this
await Task.Delay(-1);

(The showcased code uses enabled implicit usings option)

⁉️ Support

If you need help related to Guilded.NET, you can check out these places:

βœ… Goals

Our goal is to provide a library or a framework that is consistent and fast, while also maintaining friendliness towards the bot developers. API library that does not bite bot developer's hand allows bot developers to focus more on their code, have fun in what they are doing and have easier time creating their bots. Consistency helps code be more predictable, easier to rewrite and waste less time. As such, these 3 points are our main goals while maintaining Guilded.NET.