fix token variable

This commit is contained in:
2025-10-24 03:31:59 +03:00
parent cd3c5626db
commit 66f35b1a13
5 changed files with 40 additions and 4 deletions

View File

@@ -1,11 +1,13 @@
import asyncio
from .bot import bot, dp
from .bot import bot, dp, logger
async def main():
logger.info("Bot started")
await dp.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())
asyncio.run(main())

View File

@@ -7,11 +7,12 @@ from aiogram.types import (
InlineQueryResultPhoto,
)
from bestconfig import Config
from loguru import logger
config = Config()
ITEMS_PER_PAGE = 30
# Инициализация бота и диспетчера
bot = Bot(token=config.token)
bot = Bot(token=config.TOKEN)
dp = Dispatcher()
@@ -45,7 +46,6 @@ async def inline_query(query: InlineQuery):
# Определяем следующий offset
next_offset = str(offset + ITEMS_PER_PAGE)
await query.answer(
results=results,
cache_time=60,