测试变量作用域

This commit is contained in:
JakelooCheng 2025-04-28 20:32:41 +08:00
parent ea64d266a6
commit 31a25f6e18

View File

@ -163,9 +163,11 @@ class MyPlugin(Star):
conn.close()
yield event.plain_result(f"背包列表:\n{baglist_str}")
@filter.command("跟我念")
async def test(self, event: AstrMessageEvent, name: str):
yield event.plain_result(f"{name}")
testNumber = 0
@filter.command("测试")
async def test(self, event: AstrMessageEvent):
testNumber = testNumber + 1
yield event.plain_result(f"累积结果: {testNumber}")