예제 #1
0
파일: Program.cs 프로젝트: Yonom/BotCake
 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");
 }
예제 #2
0
        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);
        }