Skip to content

Commit

Permalink
feat: support Bot API 7.8 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
KnorpelSenf authored Jul 31, 2024
1 parent a49e778 commit 77f9f70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export interface UserFromGetMe extends User {
/** True, if the bot supports inline queries. Returned only in getMe. */
supports_inline_queries: boolean;
/** True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe. */
can_connect_to_business?: boolean;
can_connect_to_business: boolean;
/** True, if the bot has main Web App. Returned only in getMe. */
has_main_web_app: boolean;
}

export declare namespace Chat {
Expand Down
6 changes: 5 additions & 1 deletion methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ export type ApiMethods<F> = {

/** Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success. */
pinChatMessage(args: {
/** Unique identifier of the business connection on behalf of which the message will be pinned */
business_connection_id?: string;
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
chat_id: number | string;
/** Identifier of a message to pin */
Expand All @@ -1107,9 +1109,11 @@ export type ApiMethods<F> = {

/** Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success. */
unpinChatMessage(args: {
/** Unique identifier of the business connection on behalf of which the message will be unpinned */
business_connection_id?: string;
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
chat_id: number | string;
/** Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. */
/** Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. */
message_id?: number;
}): true;

Expand Down

0 comments on commit 77f9f70

Please sign in to comment.