feat: 实现反应和卡牌信息读取,并编写了测试用卡牌和反应
This commit is contained in:
@@ -8,4 +8,11 @@ def readReactionList() -> dict:
|
||||
return result
|
||||
|
||||
def readReaction(id: str):
|
||||
return readReactionList().get(id, -1)
|
||||
path = readReactionList().get(id, -1)
|
||||
if (path == -1):
|
||||
return {"message": f"No Reaction {id}"}
|
||||
with open(f"reactions/{path}.json", "r", encoding="utf8") as f:
|
||||
text = f.read()
|
||||
result = json.loads(text)
|
||||
|
||||
return {"message": "OK", "content": result}
|
||||
Reference in New Issue
Block a user