internal async Task MainAsync() { await _messageMonitor.AddModulesAsync(); await _client.LoginAsync(TokenType.Bot, EnvManager.DiscordToken); await _client.StartAsync(); await Task.Delay(-1); }
public async Task MainAsync() { var client = new DiscordSocketClient(); var messageMonitor = new MessageMonitor(client); var voiceChatMonitor = new VoiceChatMonitor(client); client.Log += Log; client.Ready += Ready; client.MessageReceived += messageMonitor.MessageReceived; client.UserVoiceStateUpdated += voiceChatMonitor.UserVoiceStateUpdated; await messageMonitor.AddModulesAsync(); await client.LoginAsync(TokenType.Bot, Settings.DiscordToken); await client.StartAsync(); await Task.Delay(-1); }