Beispiel #1
0
        private static void Main(string[] args)
        {
            var bot = new BotBitsClient();

            // Events
            EventLoader
            .Of(bot)
            .LoadStatic <Program>();

            // Commands
            CommandsExtension.LoadInto(bot, '!', '.');
            CommandLoader
            .Of(bot)
            .LoadStatic <Program>();

            // Login
            Login.Of(bot)
            .AsGuest()
            .CreateJoinRoom("PW01");

            // Console commands
            while (true)
            {
                CommandManager.Of(bot).ReadNextConsoleCommand();
            }
        }
        public Commands()
        {
            InitializeFinish += (sender, e) =>
            {
                roundsManager = RoundsManager.Of(BotBits);

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

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

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