RevoltSharp
  • 🏠Info
  • GitHub
  • 📋Changelog
  • Commands
    • 💻Command Handler
      • 📋Changelog
      • Guide
  • Guides
    • 📘Guides
      • Create Client
      • User Account
      • Self-hosted Revolt
      • Uploading Files
      • Sending Embeds
      • Async Events
      • Custom Requests
      • Cloudflare Under Attack Mode
  • Client Structure
    • ⚙️RevoltClient
    • 🌐Rest Client
    • 🔌Websocket Client
    • 🛡️Instance Admin Client
    • ⚡Events
    • ⛓️Extensions
  • Class Structure
    • 🎭Users & Members
    • 🏨Servers
    • #️⃣Channels
    • 🛡️Permissions
    • 💬Messages
    • 🗯️Message Properties
    • 🙂Emojis
    • 🎲Misc
Powered by GitBook
On this page
  1. Client Structure

Rest Client

RevoltRestClient

You can send Revolt API requests using this client without using parent objects.

DMChannel DM = await Client.Rest.GetUserDMChannelAsync("123");

More docs coming soon for this!

Custom Request

You can send custom requests using the method below.

HttpResponseMessage Res = await Client.Rest.SendRequestAsync(RequestType.Get, "users/123");

dynamic Obj = await Client.Rest.SendRequestAsync<dynamic>(RequestType.Get, "users/123");

You can also add a json request body using the RevoltRequest class.

public class CustomData : IRevoltRequest
{
    public string test = ":)";
}

dynamic Obj = await Client.Rest.SendRequestAsync<dynamic>(RequestType.Get, "users/123", new CustomData());
PreviousRevoltClientNextWebsocket Client

Last updated 2 years ago

🌐