static void Main() { using (var bot = new Bot()) { bot.AddPlugin(new TriviaPlugin()); bot.Connect("irc.quakenet.org", "GinnTrivia", "GinnTrivia", "GinnTrivia"); Console.WriteLine("Connected..."); bot.Join("#ginnunga"); bot.Message += (channel, sender, text) => Console.WriteLine(string.Format("{0}/{1}: {2}", channel.Name, sender, text)); Console.ReadKey(); } }
public async Task MainAsync() { Bot bot = new Bot(); bot.AddProvider( new DiscordBotProvider( new DiscordProviderConfigurations() { Token = "", ShardCount = 1 })); bot.AddPlugin( new CommandsPlugin(bot, new CommandProcessorConfiguration() { AutoSearchForCommands = true, DefaultPrefix = "!" })); await bot.StartAsync(); await Task.Delay(-1); }