Conversation
…ch can be used to get information about the chat that published a gift.
…fo which can be used to identify supergroups that are used as channel direct messages chats.
… the parent channel chat for a channel direct messages chat.
…ic to the class Message, describing a topic of a direct messages chat.
…ge, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendPaidMedia, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendDice, sendInvoice, sendMediaGroup, copyMessage, copyMessages, forwardMessage and forwardMessages. This parameter can be used to send a message to a direct messages chat topic.
…ost_parameters to the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendPaidMedia, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendDice, sendInvoice, copyMessage, forwardMessage. This parameter can be used to send a suggested post to a direct messages chat topic.
…ing suggested posts. Added the method declineSuggestedPost, allowing bots to decline incoming suggested posts.
…dministrator and ChatAdministratorRights.
…to identify paid posts. Such posts must not be deleted for 24 hours to receive the payment.
Collaborator
Author
|
@Badiboy Done, need a thorough review |
Collaborator
|
Got it. |
Collaborator
Author
|
@Badiboy are you done? |
Badiboy
requested changes
Aug 28, 2025
telebot/__init__.py
Outdated
| )) | ||
|
|
||
|
|
||
| def approve_suggested_post(self, chat_id: Union[int, str], message_id: int, send_date: Optional[int]=None) -> bool: |
Collaborator
There was a problem hiding this comment.
chat_id: Union[int, str] - Integer only.
chat_id Integer Yes Unique identifier for the target direct messages chat
telebot/__init__.py
Outdated
| return apihelper.approve_suggested_post(self.token, chat_id, message_id, | ||
| send_date=send_date) | ||
|
|
||
| def decline_suggested_post(self, chat_id: Union[int, str], message_id: int, comment: Optional[str]=None) -> bool: |
telebot/async_telebot.py
Outdated
| ) | ||
| ) | ||
|
|
||
| async def approve_suggested_post(self, chat_id: Union[int, str], message_id: int, send_date: Optional[int]=None) -> bool: |
telebot/async_telebot.py
Outdated
| return await asyncio_helper.approve_suggested_post(self.token, chat_id, message_id, | ||
| send_date=send_date) | ||
|
|
||
| async def decline_suggested_post(self, chat_id: Union[int, str], message_id: int, comment: Optional[str]=None) -> bool: |
telebot/types.py
Outdated
| :return: Instance of the class | ||
| :rtype: :class:`SuggestedPostApproved` | ||
| """ | ||
| def __init__(self, suggested_post_message: Optional[Message] = None, |
Collaborator
There was a problem hiding this comment.
send_date is not optional. Propose to change parameters order and put it in front...
telebot/types.py
Outdated
| send_date: Optional[int] = None, **kwargs): | ||
| self.suggested_post_message: Optional[Message] = suggested_post_message | ||
| self.price: Optional[SuggestedPostPrice] = price | ||
| self.send_date: Optional[int] = send_date |
telebot/types.py
Outdated
| :return: Instance of the class | ||
| :rtype: :class:`SuggestedPostRefunded` | ||
| """ | ||
| def __init__(self, suggested_post_message: Optional[Message] = None, reason: Optional[str] = None, **kwargs): |
Collaborator
There was a problem hiding this comment.
Reason is not optional. + Suggest to reorder params.
Collaborator
|
Very sorry for not reviewing so long. |
Badiboy
approved these changes
Aug 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
August 15, 2025
Bot API 9.2
Checklists
Gifts
Direct Messages in Channels
Suggested Posts