@grammyjs/types
Advanced tools
Comparing version 2.9.1 to 2.10.0
@@ -97,2 +97,4 @@ import { Location, Message, PhotoSize } from "./message"; | ||
type: "supergroup"; | ||
/** True, if the supergroup chat is a forum (has topics enabled) */ | ||
is_forum?: true; | ||
} | ||
@@ -120,2 +122,7 @@ /** Internal type representing channel chats. */ | ||
} | ||
/** Internal type holding properties that those private, supergroup, and channel chats returned from `getChat` share. */ | ||
interface NonGroupGetChat extends GetChat { | ||
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. */ | ||
active_usernames?: string[]; | ||
} | ||
/** Internal type holding properties that those group, supergroup, and channel chats returned from `getChat` share. */ | ||
@@ -143,3 +150,6 @@ interface NonPrivateGetChat extends GetChat { | ||
/** Internal type representing private chats returned from `getChat`. */ | ||
export interface PrivateGetChat extends PrivateChat, GetChat { | ||
export interface PrivateGetChat | ||
extends PrivateChat, NonGroupGetChat, GetChat { | ||
/** Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */ | ||
emoji_status_custom_emoji_id?: string; | ||
/** Bio of the other party in a private chat. Returned only in getChat. */ | ||
@@ -156,3 +166,3 @@ bio?: string; | ||
export interface SupergroupGetChat | ||
extends SupergroupChat, MultiUserGetChat, LargeGetChat { | ||
extends SupergroupChat, NonGroupGetChat, MultiUserGetChat, LargeGetChat { | ||
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. */ | ||
@@ -166,3 +176,4 @@ slow_mode_delay?: number; | ||
/** Internal type representing channel chats returned from `getChat`. */ | ||
export interface ChannelGetChat extends ChannelChat, LargeGetChat {} | ||
export interface ChannelGetChat | ||
extends ChannelChat, NonGroupGetChat, LargeGetChat {} | ||
} | ||
@@ -250,2 +261,4 @@ | ||
can_pin_messages?: boolean; | ||
/** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */ | ||
can_manage_topics?: boolean; | ||
} | ||
@@ -310,2 +323,4 @@ | ||
can_pin_messages?: boolean; | ||
/** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */ | ||
can_manage_topics?: boolean; | ||
/** Custom title for this user */ | ||
@@ -337,2 +352,4 @@ custom_title?: string; | ||
can_pin_messages: boolean; | ||
/** True, if the user is allowed to create forum topics */ | ||
can_manage_topics: boolean; | ||
/** True, if the user is allowed to send text messages, contacts, locations and venues */ | ||
@@ -418,2 +435,4 @@ can_send_messages: boolean; | ||
can_pin_messages?: boolean; | ||
/** True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */ | ||
can_manage_topics?: boolean; | ||
} | ||
@@ -429,2 +448,14 @@ | ||
/** This object represents a forum topic. */ | ||
export interface ForumTopic { | ||
/** Unique identifier of the forum topic */ | ||
message_thread_id: number; | ||
/** Name of the topic */ | ||
name: string; | ||
/** Color of the topic icon in RGB format */ | ||
icon_color: number; | ||
/** Unique identifier of the custom emoji shown as the topic icon */ | ||
icon_custom_emoji_id?: string; | ||
} | ||
/** This object represents a bot command. */ | ||
@@ -431,0 +462,0 @@ export interface BotCommand { |
@@ -12,2 +12,4 @@ import { InlineKeyboardMarkup } from "./markup"; | ||
message_id: number; | ||
/** Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only */ | ||
message_thread_id?: number; | ||
/** Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */ | ||
@@ -21,2 +23,4 @@ from?: User; | ||
chat: Chat; | ||
/** True, if the message is sent to a forum topic */ | ||
is_topic_message?: boolean; | ||
} | ||
@@ -118,2 +122,11 @@ interface CommonMessage extends ServiceMessage { | ||
& MsgWith<"proximity_alert_triggered">; | ||
export type ForumTopicCreatedMessage = | ||
& ServiceMessage | ||
& MsgWith<"forum_topic_created">; | ||
export type ForumTopicClosedMessage = | ||
& ServiceMessage | ||
& MsgWith<"forum_topic_closed">; | ||
export type ForumTopicReopenedMessage = | ||
& ServiceMessage | ||
& MsgWith<"forum_topic_reopened">; | ||
export type VideoChatScheduledMessage = | ||
@@ -203,3 +216,8 @@ & ServiceMessage | ||
proximity_alert_triggered?: ProximityAlertTriggered; | ||
/** Service message: voice chat scheduled */ | ||
/** Service message: forum topic created */ | ||
forum_topic_created?: ForumTopicCreated; | ||
/** Service message: forum topic closed */ | ||
forum_topic_closed?: ForumTopicClosed; | ||
/** Service message: forum topic reopened */ | ||
forum_topic_reopened?: ForumTopicReopened; | ||
/** Service message: video chat scheduled */ | ||
@@ -621,2 +639,18 @@ video_chat_scheduled?: VideoChatScheduled; | ||
/** This object represents a service message about a new forum topic created in the chat. */ | ||
export interface ForumTopicCreated { | ||
/** Name of the topic */ | ||
name: string; | ||
/** Color of the topic icon in RGB format */ | ||
icon_color: number; | ||
/** Unique identifier of the custom emoji shown as the topic icon */ | ||
icon_custom_emoji_id?: string; | ||
} | ||
/** This object represents a service message about a forum topic closed in the chat. Currently holds no information. */ | ||
export interface ForumTopicClosed {} | ||
/** This object represents a service message about a forum topic reopened in the chat. Currently holds no information. */ | ||
export interface ForumTopicReopened {} | ||
/** This object represents a service message about a video chat scheduled in the chat. */ | ||
@@ -623,0 +657,0 @@ export interface VideoChatScheduled { |
{ | ||
"name": "@grammyjs/types", | ||
"version": "2.9.1", | ||
"version": "2.10.0", | ||
"description": "Telegram Bot API type declarations for grammY", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
254748
4135