old_01
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from aiogram import types, Dispatcher
|
||||
from config import load_config
|
||||
|
||||
config = load_config()
|
||||
|
||||
async def admin_command(message: types.Message):
|
||||
if message.from_user.id not in config['ADMINS']:
|
||||
await message.reply("Вы не являетесь админом!")
|
||||
return
|
||||
await message.reply("Приветствую, повелитель!")
|
||||
|
||||
def register_handlers(dp: Dispatcher):
|
||||
dp.register_message_handler(admin_command, commands=['admin'])
|
||||
|
||||
Reference in New Issue
Block a user