mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 01:15:34 +00:00
portball groupindex 修复错误
This commit is contained in:
parent
9de2c867dc
commit
7b349011ed
@ -86,6 +86,8 @@ async def group_index(context):
|
||||
for i in range(min(len(member_count), 5)):
|
||||
# 获取用户信息
|
||||
target_user = await context.client(GetFullUserRequest(member_count[i][0]))
|
||||
first_name = target_user.user.first_name.replace("\u2060", "")
|
||||
first_name = target_user.user.first_name
|
||||
if first_name:
|
||||
first_name = first_name.replace("\u2060", "")
|
||||
text += f'{first_name} `{member_count[i][1]}`\n'
|
||||
await context.edit(text)
|
||||
|
@ -152,7 +152,7 @@
|
||||
},
|
||||
{
|
||||
"name": "portball",
|
||||
"version": "1.451",
|
||||
"version": "1.452",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "2.8 kb",
|
||||
@ -692,7 +692,7 @@
|
||||
},
|
||||
{
|
||||
"name": "groupindex",
|
||||
"version": "1.12",
|
||||
"version": "1.121",
|
||||
"section": "daily",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "3.2 kb",
|
||||
|
@ -1,4 +1,4 @@
|
||||
from pagermaid import bot, log
|
||||
from pagermaid import bot, log, user_id
|
||||
from pagermaid.listener import listener
|
||||
from telethon.errors import rpcerrorlist
|
||||
from asyncio import sleep
|
||||
@ -19,6 +19,9 @@ async def portball(context):
|
||||
last_name = ''
|
||||
else:
|
||||
last_name = reply.sender.last_name
|
||||
if reply.sender.id == user_id:
|
||||
await context.edit('无法禁言自己。')
|
||||
return
|
||||
else:
|
||||
await context.edit('无法获取所回复的用户。')
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user