Esempio n. 1
0
        /// <summary>
        ///     Disposes of the discord client
        /// </summary>
        public async void Dispose()
        {
            await _client.DisconnectAsync();

            _client.Dispose();
            _client = null;
            GC.SuppressFinalize(this);
        }
Esempio n. 2
0
        public async Task Disconnect()
        {
            if (IsConnected)
            {
                await _discordClient.DisconnectAsync();

                _discordClient.MessageReceived -= DiscordClientOnMessageReceived;
            }
        }