public async Task StartTimersAsync() { server = bot.Guilds.FirstOrDefault(x => x.Id == BotConfig.Load().ServerId); channel = server.GetTextChannel(BotConfig.Load().TimerChannelId); ny = false; la = false; nywl = false; lawl = false; timerStatus = new Timer(SendStatusAsync, null, 0, 1000 * 60 * BotConfig.Load().StatusTimerInterval); timerMessage = new Timer(SendStatusMessageAsync, null, 0, 1000 * 60 * BotConfig.Load().MessageTimerInterval); var message = await channel.SendMessageAsync("Timers started."); await Delete.DelayDeleteMessageAsync(message, 5); }
public async Task StartupAsync() { await Delete.DelayDeleteMessageAsync(await channel.SendMessageAsync("GTA5PoliceV2 startup procedure.", false, null), 5); Cooldowns.SetStartupTime(DateTime.Now.TimeOfDay); Cooldowns.SetStartupDate(DateTime.Now.Date); Statistics.ResetIncomingMessages(); Statistics.ResetOutgoingMessages(); Statistics.ResetCommandRequests(); Statistics.ResetTimerMessages(); Statistics.ResetStatusChanges(); Statistics.ResetErrorsDetected(); Statistics.ResetProfanityDetected(); Statistics.ResetAdmenRequests(); }