first
This commit is contained in:
16
handlers/SuperAdminHandler.py
Normal file
16
handlers/SuperAdminHandler.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
Reference in New Issue
Block a user