restrict gbanned user

This commit is contained in:
levina 2022-02-05 14:06:51 +07:00 committed by GitHub
parent 4d2d5a1bf8
commit 0318cd7617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,10 @@ async def _human_time_duration(seconds):
command(["start", f"start@{BOT_USERNAME}"]) & filters.private & ~filters.edited command(["start", f"start@{BOT_USERNAME}"]) & filters.private & ~filters.edited
) )
async def start_(client: Client, message: Message): async def start_(client: Client, message: Message):
user_id = message.from_user.id
if await is_gbanned_user(user_id):
await message.reply_text(f"❗️ **You're blocked from using this bot!**\n\n» If you think this was an mistake, you can appeal for this ban in our support chat: @{GROUP_SUPPORT}")
return
await message.reply_text( await message.reply_text(
f"""✨ **Welcome {message.from_user.mention()} !**\n f"""✨ **Welcome {message.from_user.mention()} !**\n
💭 [{BOT_NAME}](https://t.me/{BOT_USERNAME}) **Allows you to play music and video on groups through the Telegram Group video chat!** 💭 [{BOT_NAME}](https://t.me/{BOT_USERNAME}) **Allows you to play music and video on groups through the Telegram Group video chat!**