Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        public async Task InitializeAsync()
        {
            _jisho.AddModules(Assembly.GetEntryAssembly());

            await _jisho.RunAsync();
        }