コード例 #1
0
        public override PreconditionResult CheckPermissions(OnMessageReceivedArgs e)
        {
            PreconditionResult res = new PreconditionResult();

            if (e.ChatMessage.IsModerator || e.ChatMessage.IsBroadcaster)
            {
                res.Successfully();
            }
            else
            {
                res.Unsuccessful("Нет доступа!");
            }
            return(res);
        }
コード例 #2
0
        public override PreconditionResult CheckPermissions(OnMessageReceivedArgs e)
        {
            PreconditionResult res = new PreconditionResult();

            if (e.ChatMessage.UserId == "420174531")
            {
                res.Successfully();
            }
            else
            {
                res.Unsuccessful("Эта команда только для Sayary_NULL");
            }
            return(res);
        }
コード例 #3
0
        public override PreconditionResult CheckPermissions(OnMessageReceivedArgs e)
        {
            PreconditionResult res = new PreconditionResult();

            if (ConstVaribtls.IsDebuge)
            {
                res.Successfully();
                return(res);
            }

            if (ConstVaribtls.StartBot)
            {
                res.Successfully();
            }
            else
            {
                res.Unsuccessful("Бот выключен!");
            }

            return(res);
        }