Ejemplo n.º 1
0
 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");
 }
Ejemplo n.º 2
0
        public Commands()
        {
            InitializeFinish += (sender, e) =>
            {
                roundsManager = RoundsManager.Of(BotBits);

                if (!CommandsExtension.IsLoadedInto(BotBits))
                {
                    return;
                }

                CommandLoader.Of(BotBits).Load(this);

                requireModerator = PermissionsExtension.IsLoadedInto(BotBits);
            };
        }