generated from geekiot/python-template
Add [test commands]: add test commands for bot
This commit is contained in:
parent
c9501b3a87
commit
9c7a8bf2a2
1 changed files with 33 additions and 0 deletions
|
|
@ -1 +1,34 @@
|
||||||
__all__ = []
|
__all__ = []
|
||||||
|
|
||||||
|
|
||||||
|
from aiogram.types import Message
|
||||||
|
|
||||||
|
from bot.handlers import registry
|
||||||
|
from bot.handlers.utils.types import ChatType
|
||||||
|
|
||||||
|
|
||||||
|
@registry.register(
|
||||||
|
command="start",
|
||||||
|
chat_types=ChatType.GROUP,
|
||||||
|
description="Test Start Function Description",
|
||||||
|
)
|
||||||
|
async def cmd_start(message: Message) -> None:
|
||||||
|
await message.answer("Test Start Function Answer Text")
|
||||||
|
|
||||||
|
|
||||||
|
@registry.register(
|
||||||
|
command="help",
|
||||||
|
chat_types=ChatType.PRIVATE,
|
||||||
|
description="Test Help Function Description",
|
||||||
|
)
|
||||||
|
async def cmd_help(message: Message) -> None:
|
||||||
|
await message.answer("Test Help Function Answer Text")
|
||||||
|
|
||||||
|
|
||||||
|
@registry.register(
|
||||||
|
command="group",
|
||||||
|
chat_types=ChatType.GROUP,
|
||||||
|
description="Test Group Function Description",
|
||||||
|
)
|
||||||
|
async def cmd_group(message: Message) -> None:
|
||||||
|
await message.answer("Test Group Function Answer Text")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue