telegram.Chat¶
- class telegram.Chat(*args, **kwargs)[source]¶
Bases:
telegram.TelegramObject
This object represents a chat.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
id
is equal.Changed in version 20.0:
Removed the deprecated methods
kick_member
andget_members_count
.The following are now keyword-only arguments in Bot methods:
location
,filename
,contact
,{read, write, connect, pool}_timeout
,api_kwargs
. Use a named argument for those, and notice that some positional arguments changed position as a result.
- Parameters
id (
int
) – Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.type (
str
) – Type of chat, can be eitherPRIVATE
,GROUP
,SUPERGROUP
orCHANNEL
.title (
str
, optional) – Title, for supergroups, channels and group chats.username (
str
, optional) – Username, for private chats, supergroups and channels if available.first_name (
str
, optional) – First name of the other party in a private chat.last_name (
str
, optional) – Last name of the other party in a private chat.photo (
telegram.ChatPhoto
, optional) – Chat photo. Returned only intelegram.Bot.get_chat()
.bio (
str
, optional) – Bio of the other party in a private chat. Returned only intelegram.Bot.get_chat()
.has_private_forwards (
bool
, optional) –True
, if privacy settings of the other party in the private chat allows to usetg://user?id=<user_id>
links only in chats with the user. Returned only intelegram.Bot.get_chat()
.New in version 13.9.
description (
str
, optional) – Description, for groups, supergroups and channel chats. Returned only intelegram.Bot.get_chat()
.invite_link (
str
, optional) – Primary invite link, for groups, supergroups and channel. Returned only intelegram.Bot.get_chat()
.pinned_message (
telegram.Message
, optional) – The most recent pinned message (by sending date). Returned only intelegram.Bot.get_chat()
.permissions (
telegram.ChatPermissions
) – Optional. Default chat member permissions, for groups and supergroups. Returned only intelegram.Bot.get_chat()
.slow_mode_delay (
int
, optional) – For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user. Returned only intelegram.Bot.get_chat()
.message_auto_delete_time (
int
, optional) –The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in
telegram.Bot.get_chat()
.New in version 13.4.
has_protected_content (
bool
, optional) –True
, if messages from the chat can’t be forwarded to other chats. Returned only intelegram.Bot.get_chat()
.New in version 13.9.
bot (
telegram.Bot
, optional) – The Bot to use for instance methods.sticker_set_name (
str
, optional) – For supergroups, name of group sticker set. Returned only intelegram.Bot.get_chat()
.can_set_sticker_set (
bool
, optional) –True
, if the bot can change group the sticker set. Returned only intelegram.Bot.get_chat()
.linked_chat_id (
int
, optional) – Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. Returned only intelegram.Bot.get_chat()
.location (
telegram.ChatLocation
, optional) – For supergroups, the location to which the supergroup is connected. Returned only intelegram.Bot.get_chat()
.
- bio[source]¶
Optional. Bio of the other party in a private chat. Returned only in
telegram.Bot.get_chat()
.- Type
- has_private_forwards[source]¶
Optional.
True
, if privacy settings of the other party in the private chat allows to usetg://user?id=<user_id>
links only in chats with the user.New in version 13.9.
- Type
- invite_link[source]¶
Optional. Primary invite link, for groups, supergroups and channel. Returned only in
telegram.Bot.get_chat()
.- Type
- pinned_message[source]¶
Optional. The most recent pinned message (by sending date). Returned only in
telegram.Bot.get_chat()
.- Type
- permissions[source]¶
Optional. Default chat member permissions, for groups and supergroups. Returned only in
telegram.Bot.get_chat()
.
- slow_mode_delay[source]¶
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user. Returned only in
telegram.Bot.get_chat()
.- Type
- message_auto_delete_time[source]¶
Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in
telegram.Bot.get_chat()
.New in version 13.4.
- Type
- has_protected_content[source]¶
Optional.
True
, if messages from the chat can’t be forwarded to other chats.New in version 13.9.
- Type
- linked_chat_id[source]¶
Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. Returned only in
telegram.Bot.get_chat()
.- Type
- location[source]¶
Optional. For supergroups, the location to which the supergroup is connected. Returned only in
telegram.Bot.get_chat()
.
- SENDER = 'sender'[source]¶
telegram.constants.ChatType.SENDER
New in version 13.5.
- async approve_join_request(user_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.approve_chat_join_request(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.approve_chat_join_request()
.New in version 13.8.
- async ban_chat(chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.ban_chat_sender_chat( sender_chat_id=update.effective_chat.id, *args, **kwargs )
For the documentation of the arguments, please see
telegram.Bot.ban_chat_sender_chat()
.New in version 13.9.
- async ban_member(user_id, revoke_messages=None, until_date=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.ban_chat_member(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.ban_chat_member()
.
- async ban_sender_chat(sender_chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.ban_chat_sender_chat(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.ban_chat_sender_chat()
.New in version 13.9.
- async copy_message(chat_id, message_id, caption=None, parse_mode=None, caption_entities=None, disable_notification=None, reply_to_message_id=None, allow_sending_without_reply=None, reply_markup=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.copy_message(from_chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.copy_message()
.- Returns
On success, instance representing the message posted.
- Return type
- async create_invite_link(expire_date=None, member_limit=None, name=None, creates_join_request=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.create_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.create_chat_invite_link()
.New in version 13.4.
Changed in version 13.8: Edited signature according to the changes of
telegram.Bot.create_chat_invite_link()
.- Returns
- async decline_join_request(user_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.decline_chat_join_request(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.decline_chat_join_request()
.New in version 13.8.
- async edit_invite_link(invite_link, expire_date=None, member_limit=None, name=None, creates_join_request=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.edit_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.edit_chat_invite_link()
.New in version 13.4.
Changed in version 13.8: Edited signature according to the changes of
telegram.Bot.edit_chat_invite_link()
.- Returns
- async export_invite_link(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.export_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.export_chat_invite_link()
.New in version 13.4.
- Returns
New invite link on success.
- Return type
- property full_name[source]¶
Convenience property. If
first_name
is notNone
gives,first_name
followed by (if available)last_name
.New in version 13.2.
- Type
- async get_administrators(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.get_chat_administrators(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.get_chat_administrators()
.- Returns
A list of administrators in a chat. An Array of
telegram.ChatMember
objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.- Return type
List[
telegram.ChatMember
]
- async get_member(user_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.get_chat_member(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.get_chat_member()
.- Returns
- async get_member_count(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.get_chat_member_count(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.get_chat_member_count()
.- Returns
Shortcut for:
await bot.get_chat_menu_button(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.set_chat_menu_button()
.Caution
Can only work, if the chat is a private chat.
..seealso::
set_menu_button()
New in version 20.0.
- Returns
On success, the current menu button is returned.
- Return type
- async leave(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.leave_chat(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.leave_chat()
.
- property link[source]¶
Convenience property. If the chat has a
username
, returns a t.me link of the chat.- Type
- async pin_message(message_id, disable_notification=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.pin_chat_message(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.pin_chat_message()
.
- async promote_member(user_id, can_change_info=None, can_post_messages=None, can_edit_messages=None, can_delete_messages=None, can_invite_users=None, can_restrict_members=None, can_pin_messages=None, can_promote_members=None, is_anonymous=None, can_manage_chat=None, can_manage_video_chats=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.promote_chat_member(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.promote_chat_member()
.New in version 13.2.
Changed in version 20.0: The argument
can_manage_voice_chats
was renamed tocan_manage_video_chats
in accordance to Bot API 6.0.
- async restrict_member(user_id, permissions, until_date=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.restrict_chat_member(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.restrict_chat_member()
.New in version 13.2.
- async revoke_invite_link(invite_link, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.revoke_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.revoke_chat_invite_link()
.New in version 13.4.
- Returns
- async send_action(action, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Alias for
send_chat_action
- async send_animation(animation, duration=None, width=None, height=None, thumb=None, caption=None, parse_mode=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, allow_sending_without_reply=None, caption_entities=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_animation(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_animation()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_audio(audio, duration=None, performer=None, title=None, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, parse_mode=None, thumb=None, allow_sending_without_reply=None, caption_entities=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_audio(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_audio()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_chat_action(action, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_chat_action(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_chat_action()
.
- async send_contact(phone_number=None, first_name=None, last_name=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, vcard=None, allow_sending_without_reply=None, protect_content=None, *, contact=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_contact(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_contact()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_copy(from_chat_id, message_id, caption=None, parse_mode=None, caption_entities=None, disable_notification=None, reply_to_message_id=None, allow_sending_without_reply=None, reply_markup=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.copy_message(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.copy_message()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_dice(disable_notification=None, reply_to_message_id=None, reply_markup=None, emoji=None, allow_sending_without_reply=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_dice(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_dice()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_document(document, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, parse_mode=None, thumb=None, disable_content_type_detection=None, allow_sending_without_reply=None, caption_entities=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_document(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_document()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_game(game_short_name, disable_notification=None, reply_to_message_id=None, reply_markup=None, allow_sending_without_reply=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_game(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_game()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_invoice(title, description, payload, provider_token, currency, prices, start_parameter=None, photo_url=None, photo_size=None, photo_width=None, photo_height=None, need_name=None, need_phone_number=None, need_email=None, need_shipping_address=None, is_flexible=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, provider_data=None, send_phone_number_to_provider=None, send_email_to_provider=None, allow_sending_without_reply=None, max_tip_amount=None, suggested_tip_amounts=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_invoice(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_invoice()
.Warning
As of API 5.2
start_parameter
is an optional argument and therefore the order of the arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly.Changed in version 13.5: As of Bot API 5.2, the parameter
start_parameter
is optional.- Returns
On success, instance representing the message posted.
- Return type
- async send_location(latitude=None, longitude=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, live_period=None, horizontal_accuracy=None, heading=None, proximity_alert_radius=None, allow_sending_without_reply=None, protect_content=None, *, location=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_location(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_location()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_media_group(media, disable_notification=None, reply_to_message_id=None, allow_sending_without_reply=None, protect_content=None, *, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_media_group(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_media_group()
.- Returns
On success, instance representing the message posted.
- Return type
List[
telegram.Message
]
- async send_message(text, parse_mode=None, disable_web_page_preview=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, allow_sending_without_reply=None, entities=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_message(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_message()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_photo(photo, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, parse_mode=None, allow_sending_without_reply=None, caption_entities=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_photo(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_photo()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_poll(question, options, is_anonymous=None, type=None, allows_multiple_answers=None, correct_option_id=None, is_closed=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, explanation=None, explanation_parse_mode=None, open_period=None, close_date=None, allow_sending_without_reply=None, explanation_entities=None, protect_content=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_poll(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_poll()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_sticker(sticker, disable_notification=None, reply_to_message_id=None, reply_markup=None, allow_sending_without_reply=None, protect_content=None, *, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_sticker(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_sticker()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_venue(latitude=None, longitude=None, title=None, address=None, foursquare_id=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, foursquare_type=None, google_place_id=None, google_place_type=None, allow_sending_without_reply=None, protect_content=None, *, venue=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_venue(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_venue()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_video(video, duration=None, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, width=None, height=None, parse_mode=None, supports_streaming=None, thumb=None, allow_sending_without_reply=None, caption_entities=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_video(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_video()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_video_note(video_note, duration=None, length=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, thumb=None, allow_sending_without_reply=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_video_note(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_video_note()
.- Returns
On success, instance representing the message posted.
- Return type
- async send_voice(voice, duration=None, caption=None, disable_notification=None, reply_to_message_id=None, reply_markup=None, parse_mode=None, allow_sending_without_reply=None, caption_entities=None, protect_content=None, *, filename=None, read_timeout=None, write_timeout=20, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.send_voice(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.send_voice()
.- Returns
On success, instance representing the message posted.
- Return type
- async set_administrator_custom_title(user_id, custom_title, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.set_chat_administrator_custom_title( update.effective_chat.id, *args, **kwargs )
For the documentation of the arguments, please see
telegram.Bot.set_chat_administrator_custom_title()
.
Shortcut for:
await bot.set_chat_menu_button(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.set_chat_menu_button()
.Caution
Can only work, if the chat is a private chat.
..seealso::
get_menu_button()
New in version 20.0.
- async set_permissions(permissions, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.set_chat_permissions(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.set_chat_permissions()
.
- async unban_chat(chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.unban_chat_sender_chat( sender_chat_id=update.effective_chat.id, *args, **kwargs )
For the documentation of the arguments, please see
telegram.Bot.unban_chat_sender_chat()
.New in version 13.9.
- async unban_member(user_id, only_if_banned=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.unban_chat_member(update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.unban_chat_member()
.
- async unban_sender_chat(sender_chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.unban_chat_sender_chat(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.unban_chat_sender_chat()
.New in version 13.9.
- async unpin_all_messages(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.unpin_all_chat_messages(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.unpin_all_chat_messages()
.
- async unpin_message(message_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)[source]¶
Shortcut for:
await bot.unpin_chat_message(chat_id=update.effective_chat.id, *args, **kwargs)
For the documentation of the arguments, please see
telegram.Bot.unpin_chat_message()
.