mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 11:26:47 +00:00
fuck fix AttributeError
This commit is contained in:
parent
a9fa76f2f3
commit
0dffb55978
18
fuck.py
18
fuck.py
@ -20,17 +20,27 @@ async def fuck(context):
|
|||||||
reply = await context.get_reply_message()
|
reply = await context.get_reply_message()
|
||||||
if context.is_group:
|
if context.is_group:
|
||||||
if reply:
|
if reply:
|
||||||
if reply.sender.last_name is None:
|
if reply.sender:
|
||||||
reply_last_name = ''
|
if reply.sender.last_name is None:
|
||||||
|
reply_last_name = ''
|
||||||
|
else:
|
||||||
|
reply_last_name = reply.sender.last_name
|
||||||
else:
|
else:
|
||||||
reply_last_name = reply.sender.last_name
|
try:
|
||||||
|
await context.edit('无法获取所回复的用户。')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
return
|
||||||
if context.sender:
|
if context.sender:
|
||||||
if context.sender.last_name is None:
|
if context.sender.last_name is None:
|
||||||
context_last_name = ''
|
context_last_name = ''
|
||||||
else:
|
else:
|
||||||
context_last_name = context.sender.last_name
|
context_last_name = context.sender.last_name
|
||||||
else:
|
else:
|
||||||
await context.edit('无法获取所回复的用户。')
|
try:
|
||||||
|
await context.edit('无法获取所回复的用户。')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return
|
return
|
||||||
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
|
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
|
||||||
if context.sender in admins:
|
if context.sender in admins:
|
||||||
|
Loading…
Reference in New Issue
Block a user