denyu groupindex fix a bug

This commit is contained in:
xtaodada 2021-08-24 14:56:42 +08:00
parent 1af15553ba
commit 26bbc145d3
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
3 changed files with 12 additions and 4 deletions

View File

@ -24,7 +24,11 @@ async def denyu(context):
if not reply_to_msg:
await context.edit("在某群中强制禁言某用户,需要删除他人消息权限,需要 redis。用法回复某条消息格式为 `-denyu <true|false|status>`")
return
try:
uid = reply_to_msg.sender.id
except AttributeError:
await context.edit("出错了呜呜呜 ~ 无法读取用户 id")
return
offset = 1
else:
uid = context.parameter[0]

View File

@ -12,7 +12,11 @@ async def group_index(context):
await context.edit('请在群组中运行。')
return
# 获取群组信息
try:
title = context.chat.title
except AttributeError:
await context.edit('读取群组信息失败。')
return
end_id = context.id
text = f'以下是群组 {title} 今日的活跃数据:\n'

View File

@ -122,7 +122,7 @@
},
{
"name": "denyu",
"version": "1.11",
"version": "1.111",
"section": "chat",
"maintainer": "fruitymelon",
"size": "2.7 kb",
@ -692,7 +692,7 @@
},
{
"name": "groupindex",
"version": "1.11",
"version": "1.12",
"section": "daily",
"maintainer": "xtaodada",
"size": "3.2 kb",