from core.types import MessageSession
class Temp:
data = {}
class ExecutionLockList:
_list = set()
@staticmethod
def add(msg: MessageSession):
targetId = msg.target.senderId
ExecutionLockList._list.add(targetId)
def remove(msg: MessageSession):
if targetId in ExecutionLockList._list:
ExecutionLockList._list.remove(targetId)
def check(msg: MessageSession):
return True if targetId in ExecutionLockList._list else False
def get():
return ExecutionLockList._list
__all__ = ["Temp", "ExecutionLockList"]