Cloudy API Documentation
  • SETUP
    • Introduction
    • Setting Up Your Project
    • Update Log
    • Cloudy API Tutorial
    • Credits
  • FUNCTIONS
    • AutoInject
    • Inject
    • Execute
    • GetClientsList
    • RegisterExecutor
    • IsInjected
    • AutoSetup
    • disableSecurity
    • isRobloxOpen
    • CheckRobloxVersion
    • GetUsername
    • killRoblox
    • AskAi
    • Cleanres
    • SetDiscordRpc
    • IsAutoInjectEnabled
  • credits
  • GetUserIdFromUsername
  • GetAvatar
  • SetScriptJS
  • AddTabJS
  • GetDiscordUsername
  • cPlaceId
  • cPlaceName
  • cPlaceImage
  • CHAT FUNCTIONS
    • ConnectToServer
    • ReceiveMessages
    • SendMessage
    • Disconnect
    • OnMessageReceived
    • OnError
    • Messages
Powered by GitBook
On this page
  1. CHAT FUNCTIONS

Disconnect

Disconnects the WebSocket client from the server.

This feature is deprecated and will be unsupported.

Usage:

await ChatClient.Disconnect();

Example:

try
{
    await ChatClient.Disconnect();
    Console.WriteLine("Disconnected from server.");
}
catch (Exception ex)
{
    Console.WriteLine($"Error during disconnection: {ex.Message}");
}
PreviousSendMessageNextOnMessageReceived

Last updated 1 month ago