mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 01:15:31 +00:00
Use ListItem by default in ContentType helper.
This commit is contained in:
parent
7c19634379
commit
e90ca7cfae
2 changed files with 14 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import datetime
|
||||
|
||||
from aiogram.utils.helper import Item, HelperMode, Helper
|
||||
from aiogram.utils.helper import Item, HelperMode, Helper, ListItem
|
||||
from .audio import Audio
|
||||
from .base import Deserializable
|
||||
from .chat import Chat
|
||||
|
|
@ -259,18 +259,18 @@ class ContentType(Helper):
|
|||
"""
|
||||
mode = HelperMode.lower_case
|
||||
|
||||
TEXT = Item() # text
|
||||
AUDIO = Item() # audio
|
||||
DOCUMENT = Item() # document
|
||||
GAME = Item() # game
|
||||
PHOTO = Item() # photo
|
||||
STICKER = Item() # sticker
|
||||
VIDEO = Item() # video
|
||||
VOICE = Item() # voice
|
||||
NEW_CHAT_MEMBERS = Item() # new_chat_members
|
||||
LEFT_CHAT_MEMBER = Item() # left_chat_member
|
||||
INVOICE = Item() # invoice
|
||||
SUCCESSFUL_PAYMENT = Item() # successful_payment
|
||||
TEXT = ListItem() # text
|
||||
AUDIO = ListItem() # audio
|
||||
DOCUMENT = ListItem() # document
|
||||
GAME = ListItem() # game
|
||||
PHOTO = ListItem() # photo
|
||||
STICKER = ListItem() # sticker
|
||||
VIDEO = ListItem() # video
|
||||
VOICE = ListItem() # voice
|
||||
NEW_CHAT_MEMBERS = ListItem() # new_chat_members
|
||||
LEFT_CHAT_MEMBER = ListItem() # left_chat_member
|
||||
INVOICE = ListItem() # invoice
|
||||
SUCCESSFUL_PAYMENT = ListItem() # successful_payment
|
||||
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ async def save_sticker(message: types.Message):
|
|||
# Wait next message
|
||||
# It can only be a sticker
|
||||
msg = await dp.next_message(message,
|
||||
content_types=[ContentType.STICKER],
|
||||
content_types=ContentType.STICKER,
|
||||
otherwise=handle_bad_message,
|
||||
include_cancel=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue