mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
Dev 3.x flat package (#961)
* Move packages * Added changelog * Update examples/echo_bot.py Co-authored-by: Oleg A. <t0rr@mail.ru> * Rename `handler` -> `handlers` * Update __init__.py Co-authored-by: Oleg A. <t0rr@mail.ru>
This commit is contained in:
parent
5e7932ca20
commit
4315ecf1a2
111 changed files with 376 additions and 390 deletions
|
|
@ -14,10 +14,11 @@ async def command_start_handler(message: Message) -> None:
|
|||
"""
|
||||
This handler receive messages with `/start` command
|
||||
"""
|
||||
# Most of event objects has an aliases for API methods to be called in event context
|
||||
# Most event objects have aliases for API methods that can be called in events' context
|
||||
# For example if you want to answer to incoming message you can use `message.answer(...)` alias
|
||||
# and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage` method automatically
|
||||
# or call API method directly via Bot instance: `bot.send_message(chat_id=message.chat.id, ...)`
|
||||
# and the target chat will be passed to :ref:`aiogram.methods.send_message.SendMessage`
|
||||
# method automatically or call API method directly via
|
||||
# Bot instance: `bot.send_message(chat_id=message.chat.id, ...)`
|
||||
await message.answer(f"Hello, <b>{message.from_user.full_name}!</b>")
|
||||
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ async def echo_handler(message: types.Message) -> None:
|
|||
"""
|
||||
Handler will forward received message back to the sender
|
||||
|
||||
By default message handler will handle all message types (like text, photo, sticker and etc.)
|
||||
By default, message handler will handle all message types (like text, photo, sticker and etc.)
|
||||
"""
|
||||
try:
|
||||
# Send copy of the received message
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue