public async Task Run() { Console.WriteLine(ZapQuote.RandomQuote()); _services = ConfigureServices(); _discord = _services.GetRequiredService <DiscordSocketClient>(); _commands = new CommandService(); _discord.Log += LogAsync; _discord.UserVoiceStateUpdated += OnVoiceStateUpdated; await _discord.LoginAsync(TokenType.Bot, _botToken); await _discord.StartAsync(); await _services.GetRequiredService <CommandHandlingService>().InitializeAsync(); // Keep the thing running... while (true) { await Task.Delay(TimeSpan.FromMinutes(1)); // Trigger an update on voice connections await BrannigansLaw(); } }
public async Task Zap() { await ReplyAsync(ZapQuote.RandomQuote()); }