Use this method to send static ``.WEBP``, animated ``.TGS``, or video ``.WEBM`` stickers. .. seealso:: :wiki:`Working with Files and Media ` Args: chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| sticker (:obj:`str`
(
self,
chat_id: int | str,
sticker: "FileInput | Sticker",
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: "ReplyMarkup | None" = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int | None = None,
emoji: str | None = None,
reply_parameters: "ReplyParameters | None" = None,
business_connection_id: str | None = None,
message_effect_id: str | None = None,
allow_paid_broadcast: bool | None = None,
direct_messages_topic_id: int | None = None,
suggested_post_parameters: "SuggestedPostParameters | None" = None,
*,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: int | None = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
pool_timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict | None = None,
)
| 1971 | ) |
| 1972 | |
| 1973 | async def send_sticker( |
| 1974 | self, |
| 1975 | chat_id: int | str, |
| 1976 | sticker: "FileInput | Sticker", |
| 1977 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 1978 | reply_markup: "ReplyMarkup | None" = None, |
| 1979 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 1980 | message_thread_id: int | None = None, |
| 1981 | emoji: str | None = None, |
| 1982 | reply_parameters: "ReplyParameters | None" = None, |
| 1983 | business_connection_id: str | None = None, |
| 1984 | message_effect_id: str | None = None, |
| 1985 | allow_paid_broadcast: bool | None = None, |
| 1986 | direct_messages_topic_id: int | None = None, |
| 1987 | suggested_post_parameters: "SuggestedPostParameters | None" = None, |
| 1988 | *, |
| 1989 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 1990 | reply_to_message_id: int | None = None, |
| 1991 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 1992 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 1993 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 1994 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 1995 | api_kwargs: JSONDict | None = None, |
| 1996 | ) -> Message: |
| 1997 | """ |
| 1998 | Use this method to send static ``.WEBP``, animated ``.TGS``, or video ``.WEBM`` stickers. |
| 1999 | |
| 2000 | .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>` |
| 2001 | |
| 2002 | Args: |
| 2003 | chat_id (:obj:`int` | :obj:`str`): |chat_id_channel| |
| 2004 | sticker (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | \ |
| 2005 | :obj:`bytes` | :class:`pathlib.Path` | :class:`telegram.Sticker`): Sticker to send. |
| 2006 | |fileinput| Video stickers can only be sent by a ``file_id``. Video and animated |
| 2007 | stickers can't be sent via an HTTP URL. |
| 2008 | |
| 2009 | Lastly you can pass an existing :class:`telegram.Sticker` object to send. |
| 2010 | |
| 2011 | .. versionchanged:: 13.2 |
| 2012 | Accept :obj:`bytes` as input. |
| 2013 | |
| 2014 | .. versionchanged:: 20.0 |
| 2015 | File paths as input is also accepted for bots *not* running in |
| 2016 | :paramref:`~telegram.Bot.local_mode`. |
| 2017 | emoji (:obj:`str`, optional): Emoji associated with the sticker; only for just |
| 2018 | uploaded stickers |
| 2019 | |
| 2020 | .. versionadded:: 20.2 |
| 2021 | disable_notification (:obj:`bool`, optional): |disable_notification| |
| 2022 | protect_content (:obj:`bool`, optional): |protect_content| |
| 2023 | |
| 2024 | .. versionadded:: 13.10 |
| 2025 | message_thread_id (:obj:`int`, optional): |message_thread_id_arg| |
| 2026 | |
| 2027 | .. versionadded:: 20.0 |
| 2028 | |
| 2029 | reply_markup (:class:`InlineKeyboardMarkup` | :class:`ReplyKeyboardMarkup` | \ |
| 2030 | :class:`ReplyKeyboardRemove` | :class:`ForceReply`, optional): |