This commit is contained in:
levina 2021-11-02 22:13:04 +07:00 committed by GitHub
parent bbc7519e76
commit d1d596018f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,8 +273,15 @@ async def stream(_, m: Message):
] ]
) )
try:
popo = await bot.get_me()
papa = popo
pepe = papa.id
except Exception as e:
await m.reply_text(f"error:\n\n{e}")
return
chat_title = m.chat.title chat_title = m.chat.title
a = await _.get_chat_member(m.chat.id, BOT_ID) a = await _.get_chat_member(m.chat.id, pepe)
if a.status != "administrator": if a.status != "administrator":
await m.reply_text(f"💡 To use me, I need to be an **Administrator** with the following **permissions**:\n\n» ❌ __Delete messages__\n» ❌ __Ban users__\n» ❌ __Add users__\n» ❌ __Manage voice chat__\n\nData is **updated** automatically after you **promote me**") await m.reply_text(f"💡 To use me, I need to be an **Administrator** with the following **permissions**:\n\n» ❌ __Delete messages__\n» ❌ __Ban users__\n» ❌ __Add users__\n» ❌ __Manage voice chat__\n\nData is **updated** automatically after you **promote me**")
return return
@ -299,7 +306,10 @@ async def stream(_, m: Message):
+ "\n\n» ❌ __Ban users__") + "\n\n» ❌ __Ban users__")
return return
try: try:
b = await _.get_chat_member(m.chat.id, USERBOT_ID) uber = await user.get_me()
grab = uber
good = grab.id
b = await _.get_chat_member(m.chat.id, good)
if b.status == "kicked": if b.status == "kicked":
await m.reply_text(f"@{ASSISTANT_NAME} **is banned in group** {chat_title}\n\n» **unban the userbot first if you want to use this bot.**") await m.reply_text(f"@{ASSISTANT_NAME} **is banned in group** {chat_title}\n\n» **unban the userbot first if you want to use this bot.**")
return return