Skip to content

Commit 3a46327

Browse files
author
Pietro Albini
committed
Add new botogram.Sticker.emoji attribute
This attribute contains the emoji attached to the sticker. Those emojis are set by sticker authors, and can be completly arbitrary. Support for this attribute was recently added to the upstream Bot API.
1 parent b004e16 commit 3a46327

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

botogram/objects/media.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class Sticker(BaseObject, mixins.FileMixin):
142142
}
143143
optional = {
144144
"thumb": PhotoSize,
145+
"emoji": str,
145146
"file_size": int,
146147
}
147148

docs/api/telegram.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,13 @@ about its business.
14011401

14021402
*This attribute can be None if it's not provided by Telegram.*
14031403

1404+
.. py:attribute:: emoji
1405+
1406+
The unicode emoji related to the sticker. This is set by the author of
1407+
the sticker, and it's completly arbitrary.
1408+
1409+
*This attribute can be None if it's not provided by Telegram.*
1410+
14041411
.. py:attribute:: file_size
14051412
14061413
The integer size of the file represented.

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ New features
4141
* New class :py:class:`botogram.ParsedTextEntity`
4242

4343
* Added new attribute :py:attr:`botogram.Message.pinned_message`
44+
* Added new attribute :py:attr:`botogram.Sticker.emoji`
4445
* Every method which sends something to a chat now returns the sent
4546
:py:class:`~botogram.Message`
4647

0 commit comments

Comments
 (0)