text: import logging
  from pyrogram.errors import InputUserDeactivated, UserNotParticipant, FloodWait, UserIsBlocked, PeerIdInvalid
  from info import AUTH_CHANNEL, 
  import asyncio
  from pyrogram.types import Message
  from typing import Union
  import re
  import os
  from datetime import datetime
  from typing import List
  from pyrogram.types import InlineKeyboardButton
  from database.users_chats_db import db
  from bs4 import BeautifulSoup
  import requests
  
  logger = logging.getLogger(__name__)
  logger.setLevel(logging.INFO)
  
  BTN_URL_REGEX = re.compile(
      r"(\[([^\[]+?)\]\((buttonurl|buttonalert):(?:/{0,2})(.+?)(:same)?\))"
  )
  
  
  BANNED = {}
  SMART_OPEN = '“'
  SMART_CLOSE = '”'
  START_CHAR = ('\'', '"', SMART_OPEN)
  
  # temp db for banned 
  class temp(object):
      BANNED_USERS = []
      BANNED_CHATS = []
      ME = None
      CURRENT=int(os.environ.get("SKIP", 2))
      CANCEL = False
      MELCOW = {}
      U_NAME = None
      B_NAME = None
  
  async def is_subscribed(bot, query):
      try:
          user = await bot.get_chat_member(AUTH_CHANNEL, query.from_user.id)
      except UserNotParticipant:
          pass
      except Exception as e:
          logger.exception(e)
      else:
          if user.status != 'kicked':
              return True
  
      return False
  
  
      if from_user.is_bot:
          time += "🤖 Bot :("
      elif from_user.status == 'recently':
          time += "Recently"
      elif from_user.status == 'within_week':
          time += "Within the last week"
      elif from_user.status == 'within_month':
          time += "Within the last month"
      elif from_user.status == 'long_time_ago':
          time += "A long time ago :("
      elif from_user.status == 'online':
          time += "Currently Online"
      elif from_user.status == 'offline':
          time += datetime.fromtimestamp(from_user.last_online_date).strftime("%a, %d %b %Y, %H:%M:%S")
      return time
  
  
  