private async Task MainAsync() { var token = Environment.GetEnvironmentVariable("NOT_QUAHU", EnvironmentVariableTarget.User); using (var bot = new DiscordBot(TokenType.Bot, token, new DiscordBotConfiguration { Prefixes = new[] { "~~" } })) { bot.Logger.MessageLogged += this.Logger_MessageLogged; bot.AddModules(Assembly.GetExecutingAssembly()); var guild = await bot.GetGuildAsync(416256456505950215); var channels = await guild.GetChannelsAsync(); var channel = channels.OfType <RestTextChannel>().FirstOrDefault(x => x.Name == "general"); bot.Run(); } }
public async Task InitializeAsync() { _jisho.AddModules(Assembly.GetEntryAssembly()); await _jisho.RunAsync(); }