mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added StickerType enum
This commit is contained in:
parent
00f89c57f6
commit
9d65238e43
6 changed files with 38 additions and 14 deletions
9
.butcher/enums/StickerType.yml
Normal file
9
.butcher/enums/StickerType.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
name: StickerType
|
||||
description: |
|
||||
The part of the face relative to which the mask should be placed.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#maskposition
|
||||
parse:
|
||||
entity: Sticker
|
||||
attribute: type
|
||||
regexp: "'([a-z_]+)'"
|
||||
|
|
@ -33,17 +33,17 @@ repos:
|
|||
args: [ '--config=.flake8' ]
|
||||
files: *files
|
||||
|
||||
- repo: https://github.com/floatingpurr/sync_with_poetry
|
||||
rev: 0.2.0
|
||||
hooks:
|
||||
- id: sync_with_poetry
|
||||
# - repo: https://github.com/floatingpurr/sync_with_poetry
|
||||
# rev: 0.2.0
|
||||
# hooks:
|
||||
# - id: sync_with_poetry
|
||||
|
||||
- repo: https://github.com/python-poetry/poetry
|
||||
rev: '1.2.1'
|
||||
hooks:
|
||||
- id: poetry-check
|
||||
- id: poetry-lock
|
||||
args: [ "--no-update" ]
|
||||
# - id: poetry-lock
|
||||
# args: [ "--no-update" ]
|
||||
- id: poetry-export
|
||||
args: [ "-f", "requirements.txt", "--without-hashes", "-o", "requirements/base.txt" ]
|
||||
- id: poetry-export
|
||||
|
|
|
|||
13
aiogram/enums/sticker_type.py
Normal file
13
aiogram/enums/sticker_type.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from enum import Enum
|
||||
|
||||
|
||||
class StickerType(str, Enum):
|
||||
"""
|
||||
The part of the face relative to which the mask should be placed.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#maskposition
|
||||
"""
|
||||
|
||||
REGULAR = "regular"
|
||||
MASK = "mask"
|
||||
CUSTOM_EMOJI = "custom_emoji"
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
import enum
|
||||
from typing import Any, List
|
||||
|
||||
|
||||
class AutoName(str, enum.Enum):
|
||||
@staticmethod
|
||||
def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> str:
|
||||
return name.lower()
|
||||
|
|
@ -21,5 +21,6 @@ Here is list of all available enums:
|
|||
message_entity_type
|
||||
parse_mode
|
||||
poll_type
|
||||
sticker_type
|
||||
topic_icon_color
|
||||
update_type
|
||||
|
|
|
|||
9
docs/api/enums/sticker_type.rst
Normal file
9
docs/api/enums/sticker_type.rst
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
###########
|
||||
StickerType
|
||||
###########
|
||||
|
||||
|
||||
.. automodule:: aiogram.enums.sticker_type
|
||||
:members:
|
||||
:member-order: bysource
|
||||
:undoc-members: True
|
||||
Loading…
Add table
Add a link
Reference in a new issue