Update multibot.py

This commit is contained in:
Daniil 2023-04-07 11:49:21 +03:00 committed by GitHub
parent fea1b7b0a3
commit eebfc29540
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ async def command_add_bot(message: Message, command: CommandObject, bot: Bot) ->
try:
bot_user = await new_bot.get_me()
except TelegramUnauthorizedError:
return message.answer("Invalid token")
return await message.answer("Invalid token")
await new_bot.delete_webhook(drop_pending_updates=True)
await new_bot.set_webhook(OTHER_BOTS_URL.format(bot_token=command.args))
return await message.answer(f"Bot @{bot_user.username} successful added")