fix: fixed typos and router name to be more plain
This commit is contained in:
@@ -29,4 +29,4 @@ alreadyExists = "Key already exists"
|
|||||||
|
|
||||||
noData = "No data"
|
noData = "No data"
|
||||||
|
|
||||||
foundData = "Founde data:"
|
foundData = "Found data:"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ bot = Bot(
|
|||||||
default=DefaultBotProperties(parse_mode=ParseMode.HTML),
|
default=DefaultBotProperties(parse_mode=ParseMode.HTML),
|
||||||
)
|
)
|
||||||
|
|
||||||
strategyRouter = Router()
|
workflowRouter = Router()
|
||||||
removeRouter = Router()
|
removeRouter = Router()
|
||||||
|
|
||||||
|
|
||||||
@@ -65,12 +65,12 @@ async def commandInfo(message: Message) -> None:
|
|||||||
await message.answer(msgText)
|
await message.answer(msgText)
|
||||||
|
|
||||||
|
|
||||||
@strategyRouter.message(Command("add"), F.chat.id.in_(settings.whitelist))
|
@workflowRouter.message(Command("add"), F.chat.id.in_(settings.whitelist))
|
||||||
async def commandAdd(message: Message, state: FSMContext):
|
async def commandAdd(message: Message, state: FSMContext):
|
||||||
await message.answer(strings.askParam)
|
await message.answer(strings.askParam)
|
||||||
await state.set_state(addForm.param)
|
await state.set_state(addForm.param)
|
||||||
|
|
||||||
@strategyRouter.message(F.text, addForm.param)
|
@workflowRouter.message(F.text, addForm.param)
|
||||||
async def captureStartPair(message: Message, state: FSMContext):
|
async def captureStartPair(message: Message, state: FSMContext):
|
||||||
await state.update_data(pair=message.text)
|
await state.update_data(pair=message.text)
|
||||||
data = await state.get_data()
|
data = await state.get_data()
|
||||||
@@ -125,7 +125,7 @@ async def stopBot():
|
|||||||
|
|
||||||
async def start_bot() -> None:
|
async def start_bot() -> None:
|
||||||
dp.startup.register(startBot)
|
dp.startup.register(startBot)
|
||||||
dp.include_router(strategyRouter)
|
dp.include_router(workflowRouter)
|
||||||
dp.include_router(removeRouter)
|
dp.include_router(removeRouter)
|
||||||
dp.shutdown.register(stopBot)
|
dp.shutdown.register(stopBot)
|
||||||
await dp.start_polling(bot)
|
await dp.start_polling(bot)
|
||||||
|
|||||||
Reference in New Issue
Block a user