pep8
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-07-19 19:24:08 +09:00
parent bfbaa46031
commit 8d48ee2a35

View File

@@ -10,10 +10,12 @@ load_dotenv()
BOT_TOKENS = os.getenv("BOT_TOKENS", "").split(",")
async def send_echo_message(message: Message, bot: Bot):
me = await bot.get_me()
await message.answer(f"Это бот {me.username}, вы написали \"{message.text}\"")
async def start_bot(token: str):
bot = Bot(
token,
@@ -23,8 +25,10 @@ async def start_bot(token: str):
dp.message.register(send_echo_message, F.text)
await dp.start_polling(bot)
async def main():
await asyncio.gather(*(start_bot(token) for token in BOT_TOKENS if token))
if __name__ == "__main__":
asyncio.run(main())