mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-31 16:40:53 +01:00
deprecate telegram.Emoji
This commit is contained in:
parent
00bba73673
commit
5d27059631
2 changed files with 20 additions and 11 deletions
|
@ -1,7 +0,0 @@
|
||||||
telegram.emoji module
|
|
||||||
=====================
|
|
||||||
|
|
||||||
.. automodule:: telegram.emoji
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# flake8: noqa
|
# flake8: noqa
|
||||||
# pylint: disable=C0103,R0903
|
# pylint: disable=C0103,R0903,E0213
|
||||||
#
|
#
|
||||||
# A library that provides a Python interface to the Telegram Bot API
|
# A library that provides a Python interface to the Telegram Bot API
|
||||||
# Copyright (C) 2015-2016
|
# Copyright (C) 2015-2016
|
||||||
|
@ -18,14 +18,27 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser Public License
|
# You should have received a copy of the GNU Lesser Public License
|
||||||
# along with this program. If not, see [http://www.gnu.org/licenses/].
|
# along with this program. If not, see [http://www.gnu.org/licenses/].
|
||||||
"""This module contains a object that represents an Emoji."""
|
"""This module contains a object that represents an Emoji.
|
||||||
|
|
||||||
from future.utils import bytes_to_native_str as n
|
This module will be removed in the future.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
from future.utils import bytes_to_native_str
|
||||||
|
|
||||||
|
|
||||||
class Emoji(object):
|
class Emoji2(object):
|
||||||
"""This object represents an Emoji."""
|
"""This object represents an Emoji."""
|
||||||
|
|
||||||
|
def n(b):
|
||||||
|
|
||||||
|
def e(cls):
|
||||||
|
warnings.warn("telegram.Emoji is being deprecated, please see https://git.io/v6DeB")
|
||||||
|
return bytes_to_native_str(b)
|
||||||
|
|
||||||
|
return property(e)
|
||||||
|
|
||||||
GRINNING_FACE_WITH_SMILING_EYES = n(b'\xF0\x9F\x98\x81')
|
GRINNING_FACE_WITH_SMILING_EYES = n(b'\xF0\x9F\x98\x81')
|
||||||
FACE_WITH_TEARS_OF_JOY = n(b'\xF0\x9F\x98\x82')
|
FACE_WITH_TEARS_OF_JOY = n(b'\xF0\x9F\x98\x82')
|
||||||
SMILING_FACE_WITH_OPEN_MOUTH = n(b'\xF0\x9F\x98\x83')
|
SMILING_FACE_WITH_OPEN_MOUTH = n(b'\xF0\x9F\x98\x83')
|
||||||
|
@ -879,3 +892,6 @@ class Emoji(object):
|
||||||
CLOCK_FACE_TEN_THIRTY = n(b'\xF0\x9F\x95\xA5')
|
CLOCK_FACE_TEN_THIRTY = n(b'\xF0\x9F\x95\xA5')
|
||||||
CLOCK_FACE_ELEVEN_THIRTY = n(b'\xF0\x9F\x95\xA6')
|
CLOCK_FACE_ELEVEN_THIRTY = n(b'\xF0\x9F\x95\xA6')
|
||||||
CLOCK_FACE_TWELVE_THIRTY = n(b'\xF0\x9F\x95\xA7')
|
CLOCK_FACE_TWELVE_THIRTY = n(b'\xF0\x9F\x95\xA7')
|
||||||
|
|
||||||
|
|
||||||
|
Emoji = Emoji2()
|
||||||
|
|
Loading…
Reference in a new issue