static void Main() { CakeSetup .WithBot(bot => new MyBot()) .WithCommandsExtension('!') .ListenToConsole() .Do(bot => ChatFormatsExtension.LoadInto(bot, new BasicChatSyntaxProvider("Bot"))) .Do(bot => PermissionsExtension.WithCommandsLoadInto(bot, Group.Moderator, new SimplePermissionProvider("processor"))) .AsGuest() .CreateJoinRoomAsync("PW01"); }
static void Main() { var bot = new BotBitsClient(); ChatFormatsExtension.LoadInto(bot, new CakeChatSyntaxProvider("Bot")); CommandsExtension.LoadInto(bot, '!'); Login.Of(bot).AsGuest().JoinRoom("PW01"); InitEvent.Of(bot).WaitOneAsync().Wait(); JoinCompleteEvent.Of(bot).WaitOneAsync().Wait(); Thread.Sleep(Timeout.Infinite); }