private async Task ClearupLoginInfo() { // TODO: ログイン後の処理を中止 await DiscordRestClient.LogoutAsync(); DiscordRestClient.Dispose(); // TODO: ログイン情報を全て破棄 }
public override void Dispose() { try { // If the service is currently running, this will cancel the cancellation token that was passed into // our ExecuteAsync method, unregistering our event handlers for us. base.Dispose(); } finally { _scope?.Dispose(); _discordClient.Dispose(); _restClient.Dispose(); } }
public void Dispose() { _DiscordClient?.Dispose(); }
public void Dispose() { _client.Dispose(); _cache.Dispose(); }