Пример #1
0
        private static async Task OnTimedEvent(object source, System.Timers.ElapsedEventArgs e, DiscordSocketClient _client)
        {
            Console.WriteLine("Starting!");
            Console.WriteLine("In!");
            var channelsToNotify = KnockOutHandler.NewDayForAll(Factory.GetDatabase());

            foreach (var c in channelsToNotify)
            {
                var discordChannel = (ISocketMessageChannel)_client.GetChannel(c);
                await discordChannel.SendMessageAsync("It is a glorious new hour. Everyone's turns are reset!");
            }

            await Task.Delay(-1);
        }