> For the complete documentation index, see [llms.txt](https://docs.fluxpoint.dev/stoatsharp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluxpoint.dev/stoatsharp/guides/guides/create-client.md).

# Create Client

{% hint style="info" %}
You need to download this lib from NuGet <https://www.nuget.org/packages/RevoltSharp>

\
You can use Visual Studio or Visual Studio Code\
![](/files/tJSKAgIWiKmcYBQSkHWO)<br>

![](/files/IFYwOjpNZOMTp7KPbAYX)
{% endhint %}

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

public static RevoltClient Client;
public static async Task Start()
{
    Client = new RevoltClient(ClientMode.WebSocket);
    await Client.LoginAsync(Token, AccountType.Bot);
    // You don't need to run StartAsync for Http mode only WebSocket mode.
    await Client.StartAsync();
    await Task.Delay(-1);
}
```

<pre class="language-csharp" data-overflow="wrap"><code class="lang-csharp">public enum ClientMode
{
    /// &#x3C;summary>
    /// Client will only use the http/rest client of Revolt and removes any usage/memory of websocket stuff. 
    /// &#x3C;/summary>
    Http, 
    
    /// &#x3C;summary>
<strong>    /// Will use both WebSocket and http/rest client so you can get cached data for User, Server, Channel
</strong>    /// &#x3C;/summary>
    WebSocket
}
</code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fluxpoint.dev/stoatsharp/guides/guides/create-client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
