public bool ClearAutoPower(MsgInformationEx MsgDTO, object[] param) { MongoService <AutoPowerSetting> .DeleteMany(p => p.GroupNum == MsgDTO.FromGroup); MsgSender.PushMsg(MsgDTO, "清除成功!"); return(true); }
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); }
protected override void ScheduleDo(SchedulerTimer timer) { var outOfDateRecords = MongoService <DriftBottleRecord> .Get(r => r.ReceivedQQ != null); MongoService <DriftBottleRecord> .DeleteMany(outOfDateRecords); }
/// <summary> /// 移除一个群组信息 /// </summary> /// <param name="GroupNum"></param> public static void Delete(long GroupNum) { MongoService <GroupSettings> .DeleteMany(p => p.GroupNum == GroupNum); }
public static void ReleaseLock(long QQNum, string Cmd) { MongoService <CmdLockRec> .DeleteMany(p => p.QQNum == QQNum && p.Cmd == Cmd); }
public static void Remove(long QQNum, string BuffName) { MongoService <OSPersonBuff> .DeleteMany(p => p.QQNum == QQNum && p.Name == BuffName); }
public static void RemoveAll(long QQNum) { MongoService <OSPersonBuff> .DeleteMany(p => p.QQNum == QQNum); }