Esempio n. 1
0
        public bool ClearAutoPower(MsgInformationEx MsgDTO, object[] param)
        {
            MongoService <AutoPowerSetting> .DeleteMany(p => p.GroupNum == MsgDTO.FromGroup);

            MsgSender.PushMsg(MsgDTO, "清除成功!");
            return(true);
        }
Esempio n. 2
0
        public bool ClearSayings(MsgInformationEx MsgDTO, object[] param)
        {
            var query = MongoService <Saying> .Get(s => s.FromGroup == MsgDTO.FromGroup &&
                                                   (s.Content.Contains(MsgDTO.Msg) ||
                                                    s.Charactor.Contains(MsgDTO.Msg) ||
                                                    s.Cartoon.Contains(MsgDTO.Msg)));

            var count = query.Count;

            MongoService <Saying> .DeleteMany(query);

            MsgSender.PushMsg(MsgDTO, $"共删除{count}条语录");
            return(true);
        }
Esempio n. 3
0
        protected override void ScheduleDo(SchedulerTimer timer)
        {
            var outOfDateRecords = MongoService <DriftBottleRecord> .Get(r => r.ReceivedQQ != null);

            MongoService <DriftBottleRecord> .DeleteMany(outOfDateRecords);
        }
Esempio n. 4
0
 /// <summary>
 /// 移除一个群组信息
 /// </summary>
 /// <param name="GroupNum"></param>
 public static void Delete(long GroupNum)
 {
     MongoService <GroupSettings> .DeleteMany(p => p.GroupNum == GroupNum);
 }
Esempio n. 5
0
 public static void ReleaseLock(long QQNum, string Cmd)
 {
     MongoService <CmdLockRec> .DeleteMany(p => p.QQNum == QQNum && p.Cmd == Cmd);
 }
Esempio n. 6
0
 public static void Remove(long QQNum, string BuffName)
 {
     MongoService <OSPersonBuff> .DeleteMany(p => p.QQNum == QQNum && p.Name == BuffName);
 }
Esempio n. 7
0
 public static void RemoveAll(long QQNum)
 {
     MongoService <OSPersonBuff> .DeleteMany(p => p.QQNum == QQNum);
 }