Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/core/builtins/temp/__init__.py
2023-02-05 22:33:33 +08:00

32 lines
724 B
Python

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)
@staticmethod
def remove(msg: MessageSession):
targetId = msg.target.senderId
if targetId in ExecutionLockList._list:
ExecutionLockList._list.remove(targetId)
@staticmethod
def check(msg: MessageSession):
targetId = msg.target.senderId
return True if targetId in ExecutionLockList._list else False
@staticmethod
def get():
return ExecutionLockList._list
__all__ = ["Temp", "ExecutionLockList"]