mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +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
|
|
@ -7,7 +7,7 @@ from types import TracebackType
|
|||
from typing import Any, Awaitable, Callable, Dict, Optional, Type, Union
|
||||
|
||||
from aiogram import BaseMiddleware, Bot
|
||||
from aiogram.dispatcher.flags.getter import get_flag
|
||||
from aiogram.dispatcher.flags import get_flag
|
||||
from aiogram.types import Message, TelegramObject
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
|||
|
|
@ -42,13 +42,17 @@ Decode it back example:
|
|||
await message.answer(f"Your payload: {payload}")
|
||||
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from base64 import urlsafe_b64decode, urlsafe_b64encode
|
||||
from typing import Literal, cast
|
||||
from typing import TYPE_CHECKING, Literal, cast
|
||||
|
||||
from aiogram import Bot
|
||||
from aiogram.utils.link import create_telegram_link
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from aiogram import Bot
|
||||
|
||||
BAD_PATTERN = re.compile(r"[^_A-z0-9-]")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ except ImportError: # pragma: no cover
|
|||
|
||||
|
||||
from aiogram import BaseMiddleware, Router
|
||||
from aiogram.dispatcher.fsm.context import FSMContext
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.types import TelegramObject, User
|
||||
from aiogram.utils.i18n.core import I18n
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from typing import (
|
|||
no_type_check,
|
||||
)
|
||||
|
||||
from aiogram.dispatcher.filters.callback_data import CallbackData
|
||||
from aiogram.filters.callback_data import CallbackData
|
||||
from aiogram.types import (
|
||||
CallbackGame,
|
||||
InlineKeyboardButton,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ __all__ = (
|
|||
"TextDecoration",
|
||||
"html_decoration",
|
||||
"markdown_decoration",
|
||||
"add_surrogates",
|
||||
"remove_surrogates",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ def safe_parse_webapp_init_data(
|
|||
"""
|
||||
Validate raw WebApp init data and return it as WebAppInitData object
|
||||
|
||||
Raise :type:`ValueError` when data is invalid
|
||||
Raise :obj:`ValueError` when data is invalid
|
||||
|
||||
:param token: bot token
|
||||
:param init_data: data from frontend to be parsed and validated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue