From 281dda52de57c454a74ac9e775b1203853f9642f Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 24 Jan 2021 21:10:50 +0200 Subject: [PATCH] Fix emoji --- aiogram/client/bot.py | 12 ++++++------ aiogram/methods/promote_chat_member.py | 2 +- aiogram/methods/send_dice.py | 2 +- aiogram/types/dice.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index b55e9aa5..695b7b28 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -1260,7 +1260,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each :param is_anonymous: True, if the poll needs to be anonymous, defaults to :code:`True` :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False* + :param allows_multiple_answers: True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. @@ -1314,7 +1314,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#senddice :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '', '', '', '', or ''. Dice can have values 1-6 for '' and '', values 1-5 for '' and '', and values 1-64 for ''. Defaults to '' + :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', or '🎰'. Dice can have values 1-6 for '🎲' and '🎯', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param reply_to_message_id: If the message is a reply, ID of the original message :param allow_sending_without_reply: Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found @@ -1499,7 +1499,7 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> bool: """ - Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass *False* for all boolean parameters to demote a user. Returns :code:`True` on success. + Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#promotechatmember @@ -2570,8 +2570,8 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#answerprecheckoutquery :param pre_checkout_query_id: Unique identifier for the query to be answered - :param ok: Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems. - :param error_message: Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. + :param ok: Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems. + :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. :param request_timeout: Request timeout :return: On success, True is returned. """ @@ -2663,7 +2663,7 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> Union[Message, bool]: """ - Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited :class:`aiogram.types.message.Message`, otherwise returns :code:`True`. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is *False*. + Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited :class:`aiogram.types.message.Message`, otherwise returns :code:`True`. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. Source: https://core.telegram.org/bots/api#setgamescore diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index c48b734b..335dd522 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: # pragma: no cover class PromoteChatMember(TelegramMethod[bool]): """ - Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass *False* for all boolean parameters to demote a user. Returns :code:`True` on success. + Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#promotechatmember """ diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py index c8a8d981..ca8e0c12 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -27,7 +27,7 @@ class SendDice(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" emoji: Optional[str] = None - """Emoji on which the dice throw animation is based. Currently, must be one of '', '', '', '', or ''. Dice can have values 1-6 for '' and '', values 1-5 for '' and '', and values 1-64 for ''. Defaults to ''""" + """Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', or '🎰'. Dice can have values 1-6 for '🎲' and '🎯', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" reply_to_message_id: Optional[int] = None diff --git a/aiogram/types/dice.py b/aiogram/types/dice.py index 41dfbf75..b40ee0c4 100644 --- a/aiogram/types/dice.py +++ b/aiogram/types/dice.py @@ -13,7 +13,7 @@ class Dice(TelegramObject): emoji: str """Emoji on which the dice throw animation is based""" value: int - """Value of the dice, 1-6 for '' and '' base emoji, 1-5 for '' and '' base emoji, 1-64 for '' base emoji""" + """Value of the dice, 1-6 for '🎲' and '🎯' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji""" class DiceEmoji: