Пример #1
0
        public static async Task Cleanup()
        {
            WaitMany(
                (await _hostBot.GetGuilds()).Select(x => x.Owner.Id == _hostBot.CurrentUser.Id ? x.Delete() : x.Leave()),
                (await _targetBot.GetGuilds()).Select(x => x.Owner.Id == _targetBot.CurrentUser.Id ? x.Delete() : x.Leave()),
                (await _observerBot.GetGuilds()).Select(x => x.Owner.Id == _observerBot.CurrentUser.Id ? x.Delete() : x.Leave()));

            WaitAll(
                _hostBot.Disconnect(),
                _targetBot.Disconnect(),
                _observerBot.Disconnect());
        }