mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 08:34:52 +00:00
eat fix a bug
This commit is contained in:
parent
21547d85ce
commit
675eef29e9
4
eat.py
4
eat.py
@ -15,7 +15,7 @@ from telethon.errors.rpcerrorlist import ChatSendStickersForbiddenError
|
||||
from struct import error as StructError
|
||||
from pagermaid.listener import listener
|
||||
from pagermaid.utils import alias_command
|
||||
from pagermaid import redis, config, bot
|
||||
from pagermaid import redis, config, bot, user_id
|
||||
from collections import defaultdict
|
||||
import json
|
||||
|
||||
@ -43,6 +43,8 @@ configFileRemoteUrlKey = "eat.configFileRemoteUrl"
|
||||
async def get_full_id(object_n):
|
||||
if isinstance(object_n, Channel):
|
||||
return (await bot(GetFullChannelRequest(object_n.id))).full_chat.id # noqa
|
||||
elif not object_n:
|
||||
return user_id
|
||||
return (await bot(GetFullUserRequest(object_n.id))).user.id
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user