mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🐛 修复群欢迎消息删除问题
This commit is contained in:
parent
f1d32bff89
commit
98a198631e
@ -125,7 +125,7 @@ async def _(session: Uninfo, arparma: Arparma, idx: Match[int]):
|
||||
|
||||
@_del_matcher.handle()
|
||||
async def _(session: Uninfo, arparma: Arparma, idx: int):
|
||||
result = await Manager.delete_group_message(session, int(idx))
|
||||
result = await Manager.delete_group_message(session, idx)
|
||||
if not result:
|
||||
await MessageUtils.build_message("未查找到指定id的群组欢迎消息...").finish()
|
||||
await MessageUtils.build_message(result).send()
|
||||
|
||||
@ -248,9 +248,11 @@ class Manager:
|
||||
返回:
|
||||
list: 消息内容
|
||||
"""
|
||||
path = cls.get_path(session)
|
||||
json_data = cls.__get_data(session)
|
||||
if not json_data:
|
||||
if not json_data or not path:
|
||||
return None
|
||||
file = path / "text.json"
|
||||
key_list = list(json_data.keys())
|
||||
if idx < 0 or idx >= len(key_list):
|
||||
return None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user