/// <summary> /// Disposes of the discord client /// </summary> public async void Dispose() { await _client.DisconnectAsync(); _client.Dispose(); _client = null; GC.SuppressFinalize(this); }
public async Task Disconnect() { if (IsConnected) { await _discordClient.DisconnectAsync(); _discordClient.MessageReceived -= DiscordClientOnMessageReceived; } }