Create Client

Getting started with using RevoltSharp lib!

You need to download this lib from NuGet https://www.nuget.org/packages/RevoltSharp

static void Main(string[] args)
{
    Start().GetAwaiter().GetResult();
}

public static RevoltClient Client;
public static async Task Start()
{
    Client = new RevoltClient("Bot Token", ClientMode.WebSocket);
    // You need to run StartAsync() for WebSocket mode or Http mode.
    await Client.StartAsync();
    await Task.Delay(-1);
}
public enum ClientMode
{
    /// <summary>
    /// Client will only use the http/rest client of Revolt and removes any usage/memory of websocket stuff. 
    /// </summary>
    Http, 
    
    /// <summary>
    /// Will use both WebSocket and http/rest client so you can get cached data for User, Server, Channel
    /// </summary>
    WebSocket
}

Last updated