This commit is contained in:
6
bot.py
6
bot.py
@@ -2,8 +2,8 @@ from aiogram import Bot, Dispatcher, types
|
|||||||
from aiogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
|
from aiogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
|
||||||
from aiogram.utils import executor
|
from aiogram.utils import executor
|
||||||
from aiogram.dispatcher.filters import Text
|
from aiogram.dispatcher.filters import Text
|
||||||
from user_manager import user_manager
|
from pomodoro_bot.user_manager import user_manager
|
||||||
from timer_manager import timer_manager
|
from pomodoro_bot.timer_manager import timer_manager
|
||||||
import os
|
import os
|
||||||
|
|
||||||
API_TOKEN = os.getenv("BOT_TOKEN")
|
API_TOKEN = os.getenv("BOT_TOKEN")
|
||||||
@@ -40,4 +40,4 @@ async def handle_callback(call: types.CallbackQuery):
|
|||||||
await call.answer()
|
await call.answer()
|
||||||
|
|
||||||
def run_bot():
|
def run_bot():
|
||||||
executor.start_polling(dp, skip_updates=True)
|
executor.start_polling(dp, skip_updates=True)
|
||||||
4
main.py
4
main.py
@@ -1,6 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from bot import run_bot
|
from pomodoro_bot.bot import run_bot
|
||||||
from redis_client import init_redis
|
from pomodoro_bot.redis_client import init_redis
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
asyncio.run(init_redis())
|
asyncio.run(init_redis())
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from user_manager import user_manager
|
from pomodoro_bot.user_manager import user_manager
|
||||||
from models import UserState
|
from pomodoro_bot.models import UserState
|
||||||
from aiogram import Bot
|
from aiogram import Bot
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from models import UserState
|
from pomodoro_bot.models import UserState
|
||||||
from redis_client import redis
|
from pomodoro_bot.redis_client import redis
|
||||||
|
|
||||||
class UserManager:
|
class UserManager:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user