示例#1
0
        /// <summary>
        /// 消息接收函数
        /// </summary>
        public void GetChat(WholeMatchCmdType cmdType)
        {
            if (MFKEventArgs == null || Sender == null || CheckInCD.isInCD(MFKEventArgs))
            {
                return;
            }
            this.QQGroup = MFKEventArgs.FromGroup;
            switch (cmdType)
            {
            //生成随机数
            case WholeMatchCmdType.SurpriseMFK_Random:
                RandomNumber();
                break;

            //随机禁言套餐
            case WholeMatchCmdType.SurpriseMFK_Ban:
                RandomBan();
                break;

            //昏睡套餐
            case WholeMatchCmdType.SurpriseMFK_RedTea:
                RedTea();
                break;

            //恶臭问答
            //这个是不是多余了(
            case WholeMatchCmdType.SurpriseMFK_24YearsOld:
                QQGroup.SendGroupMessage("24岁,是学生");
                break;
            }
        }
示例#2
0
        /// <summary>
        /// 用于处理传入指令
        /// </summary>
        public async void GetChat()
        {
            ConfigManager configManager = new ConfigManager(HsoEventArgs.LoginUid);

            configManager.LoadUserConfig(out UserConfig userConfig);
            if (CheckGroupBlock(userConfig))
            {
                return;
            }
            if (CheckInCD.isInCD(HsoEventArgs.SourceGroup, HsoEventArgs.Sender))
            {
                await HsoEventArgs.SourceGroup.SendGroupMessage(CQCode.CQAt(HsoEventArgs.Sender), "你是不是只会要色图");

                return;
            }

            //检查色图文件夹大小
            if (IOUtils.GetHsoSize() >= userConfig.HsoConfig.SizeLimit * 1024 * 1024)
            {
                Log.Warning("Hso", "色图文件夹超出大小限制,将清空文件夹");
                Directory.Delete(IOUtils.GetHsoPath(), true);
            }

            await GiveMeSetu(userConfig.HsoConfig);
        }
示例#3
0
 internal static async ValueTask GroupPokeEventParse(object sender, GroupPokeEventArgs groupPokeEventArgs)
 {
     if (groupPokeEventArgs.TargetUser == groupPokeEventArgs.LoginUid &&
         !CheckInCD.isInCD(groupPokeEventArgs.SourceGroup, groupPokeEventArgs.SendUser))
     {
         await groupPokeEventArgs.SourceGroup.SendGroupMessage(CQCode.CQAt(groupPokeEventArgs.SendUser),
                                                               "\r\n你今晚必被爽哥杀害\r\n",
                                                               CQCode.CQImage("https://i.loli.net/2020/10/20/zWPyocxFEVp2tDT.jpg"));
     }
 }