mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 12:17:50 +00:00
fuck fix AttributeError
This commit is contained in:
parent
a9fa76f2f3
commit
0dffb55978
10
fuck.py
10
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:
|
||||||
if reply.sender.last_name is None:
|
if reply.sender.last_name is None:
|
||||||
reply_last_name = ''
|
reply_last_name = ''
|
||||||
else:
|
else:
|
||||||
reply_last_name = reply.sender.last_name
|
reply_last_name = reply.sender.last_name
|
||||||
|
else:
|
||||||
|
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:
|
||||||
|
try:
|
||||||
await context.edit('无法获取所回复的用户。')
|
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