tg_bot/handlers/SuperAdminHandler.py

17 lines
577 B
Python
Raw Permalink Normal View History

2024-12-06 14:20:29 +03:00
from bot.DaMsg import DaMsg
from bot.Handler import Handler
from bot import config, FIRST
from itguild_api import client
class SuperAdminHandler(Handler):
@staticmethod
async def super_admin_text(update, context):
if int(update.effective_chat.id) == int(config['SUPER_ADMINS']):
all = client.tgBot.get_all()
for user in all:
if int(user['dialog_id']) != int(config['SUPER_ADMINS']):
await context.bot.send_message(chat_id=user['dialog_id'], text=update.effective_message.text)
return FIRST