Radarcord.NET 1.0.1

dotnet add package Radarcord.NET --version 1.0.1
NuGet\Install-Package Radarcord.NET -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Radarcord.NET" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Radarcord.NET --version 1.0.1
#r "nuget: Radarcord.NET, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Radarcord.NET as a Cake Addin
#addin nuget:?package=Radarcord.NET&version=1.0.1

// Install Radarcord.NET as a Cake Tool
#tool nuget:?package=Radarcord.NET&version=1.0.1

Radarcord.NET

The best way to interact with the Radarcord API with DSharpPlus and .NET!

Note

This package is used with DSharpPlus, not Discord.Net, if you want an integration with that, I'll be publishing one soon.

Compatibility

This package only supports .NET 7 at this point in time.

Please note that this package is only compatible with the specified version, and other versions of .NET may not work/have issues.

Features

  • Easy to use, less pressure on working with HTTP.
  • Autoposting support, keep getting your stats!
  • Webhook support soon!
  • Constantly maintained to keep up with the thriving .NET ecosystem!

Installation

Installation is super easy, just run the following command:

Package Manager Console (Visual Studio)

Install-Package Radarcord.NET

.NET CLI

dotnet add package Radarcord.NET

Basic Usage

using DSharpPlus;
using DSharpPlus.EventArgs;
using Radarcord;

namespace MyBot
{
    public class Program
    {
        private RadarcordClient? radar;

        public static async Task Main()
        {
            var program = new Program();
            await program.StartBot();
        }

        private async Task StartBot()
        {
            var discord = new DiscordClient(new DiscordConfiguration()
            {
                Token = "YOUR_TOKEN_HERE",
                TokenType = TokenType.Bot,
                Intents = DiscordIntents.AllUnprivileged
            });
            radar = new RadarcordClient(discord, "YOUR_RADARCORD_API_TOKEN_HERE");

            discord.Ready += OnClientReady;

            await discord.ConnectAsync();

            // Keep the program running until the user presses the keyboard interrupt keybind.
            await Task.Delay(-1);
        }

        private Task OnClientReady(DiscordClient sender, ReadyEventArgs args)
        {
            Console.WriteLine("The client is ready!");

            if (radar is null) return Task.CompletedTask;

            // Post bot stats to Radarcord
            radar.PostStatsAsync();

            return Task.CompletedTask;
        }
    }
}

Documentation

Documentation will be coming pretty soon.

Copyright (c) 2023 - present Yoshiboi18303.

Licensed under the MIT License

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 161 8/1/2023
1.0.0 155 7/31/2023

Fixed post bug.
     Added extra XML comments.