Whitespace

This commit is contained in:
2023-07-25 16:42:26 +02:00
parent 9094955812
commit 5ab22909cf

View File

@@ -95,11 +95,13 @@ async def elevate_to_admin(bot: Bot, update: dict, user_record: dict,
def allow_elevation_to_admin(telegram_bot: Bot) -> None: def allow_elevation_to_admin(telegram_bot: Bot) -> None:
secret = get_secure_key(length=15) secret = get_secure_key(length=15)
@telegram_bot.additional_task('BEFORE') @telegram_bot.additional_task('BEFORE')
async def print_secret(): async def print_secret():
await telegram_bot.get_me() await telegram_bot.get_me()
logging.info(f"To get administration privileges, enter code {secret} " logging.info(f"To get administration privileges, enter code {secret} "
f"or click here: https://t.me/{telegram_bot.name}?start=00elevate_{secret}") f"or click here: https://t.me/{telegram_bot.name}?start=00elevate_{secret}")
@telegram_bot.command(command='/elevate', aliases=['00elevate_'], show_in_keyboard=False, @telegram_bot.command(command='/elevate', aliases=['00elevate_'], show_in_keyboard=False,
authorization_level='anybody') authorization_level='anybody')
async def _elevate_to_admin(bot, update, user_record): async def _elevate_to_admin(bot, update, user_record):