Exemplo n.º 1
0
        private async Task ClearupLoginInfo()
        {
            // TODO: ログイン後の処理を中止
            await DiscordRestClient.LogoutAsync();

            DiscordRestClient.Dispose();

            // TODO: ログイン情報を全て破棄
        }
Exemplo n.º 2
0
 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();
     }
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     _DiscordClient?.Dispose();
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     _client.Dispose();
     _cache.Dispose();
 }