Socket
Socket
Sign inDemoInstall

@grammyjs/types

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammyjs/types - npm Package Compare versions

Comparing version 3.6.2 to 3.7.0

4

inline.d.ts

@@ -288,3 +288,3 @@ import type { Chat, User } from "./manage.js";

horizontal_accuracy?: number;
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */
/** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
live_period?: number;

@@ -566,3 +566,3 @@ /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */

horizontal_accuracy?: number;
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */
/** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
live_period?: number;

@@ -569,0 +569,0 @@ /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */

@@ -57,22 +57,12 @@ import type { Location, Message, PhotoSize, ReactionType, Sticker } from "./message.js";

export declare namespace Chat {
/** Internal type holding properties that all kinds of chats share. */
interface AbstractChat {
/** Internal type for private chats */
interface PrivateChat {
/** Unique identifier for this chat. */
id: number;
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
type: string;
}
/** Internal type holding properties that those chats with user names share. */
interface UserNameChat {
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "private";
/** Title, for supergroups, channels and group chats */
title?: undefined;
/** Username, for private chats, supergroups and channels if available */
username?: string;
}
/** Internal type holding properties that those chats with titles share. */
interface TitleChat {
/** Title, for supergroups, channels and group chats */
title: string;
}
/** Internal type representing private chats. */
interface PrivateChat extends AbstractChat, UserNameChat {
type: "private";
/** First name of the other party in a private chat */

@@ -82,120 +72,421 @@ first_name: string;

last_name?: string;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: undefined;
}
/** Internal type representing group chats. */
interface GroupChat extends AbstractChat, TitleChat {
/** Internal type for group chats */
interface GroupChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "group";
/** Title, for supergroups, channels and group chats */
title: string;
/** Username, for private chats, supergroups and channels if available */
username?: undefined;
/** First name of the other party in a private chat */
first_name?: undefined;
/** Last name of the other party in a private chat */
last_name?: undefined;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: undefined;
}
/** Internal type representing super group chats. */
interface SupergroupChat extends AbstractChat, UserNameChat, TitleChat {
/** Internal type for supergroup chats */
interface SupergroupChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "supergroup";
/** Title, for supergroups, channels and group chats */
title: string;
/** Username, for private chats, supergroups and channels if available */
username?: string;
/** First name of the other party in a private chat */
first_name?: undefined;
/** Last name of the other party in a private chat */
last_name?: undefined;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: true;
}
/** Internal type representing channel chats. */
interface ChannelChat extends AbstractChat, UserNameChat, TitleChat {
/** Internal type for channel chats */
interface ChannelChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "channel";
/** Title, for supergroups, channels and group chats */
title: string;
/** Username, for private chats, supergroups and channels if available */
username?: string;
/** First name of the other party in a private chat */
first_name?: undefined;
/** Last name of the other party in a private chat */
last_name?: undefined;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: undefined;
}
/** Internal type holding properties that those chats returned from `getChat` share. */
interface GetChat {
/** Chat photo. Returned only in getChat. */
}
/** This object represents a chat. */
export type Chat = Chat.PrivateChat | Chat.GroupChat | Chat.SupergroupChat | Chat.ChannelChat;
export declare namespace ChatFullInfo {
/** Internal type for private chats */
interface PrivateChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "private";
/** Title, for supergroups, channels and group chats */
title?: undefined;
/** Username, for private chats, supergroups and channels if available */
username?: string;
/** First name of the other party in a private chat */
first_name: string;
/** Last name of the other party in a private chat */
last_name?: string;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: undefined;
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
accent_color_id: number;
/** The maximum number of reactions that can be set on a message in the chat */
max_reaction_count: number;
/** Chat photo */
photo?: ChatPhoto;
/** The most recent pinned message (by sending date). Returned only in getChat. */
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
active_usernames?: string[];
/** For private chats, the date of birth of the user */
birthdate?: Birthdate;
/** For private chats with business accounts, the intro of the business */
business_intro?: BusinessIntro;
/** For private chats with business accounts, the location of the business */
business_location?: BusinessLocation;
/** For private chats with business accounts, the opening hours of the business */
business_opening_hours?: BusinessOpeningHours;
/** For private chats, the personal channel of the user */
personal_chat?: Chat;
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
available_reactions?: ReactionType[];
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
background_custom_emoji_id?: string;
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
profile_accent_color_id?: number;
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
profile_background_custom_emoji_id?: string;
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
emoji_status_custom_emoji_id?: string;
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
emoji_status_expiration_date?: number;
/** Bio of the other party in a private chat */
bio?: string;
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
has_private_forwards?: true;
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
has_restricted_voice_and_video_messages?: true;
/** True, if users need to join the supergroup before they can send messages */
join_to_send_messages?: undefined;
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
join_by_request?: undefined;
/** Description, for groups, supergroups and channel chats */
description?: undefined;
/** Primary invite link, for groups, supergroups and channel chats */
invite_link?: undefined;
/** The most recent pinned message (by sending date) */
pinned_message?: Message;
/** The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. */
/** Default chat member permissions, for groups and supergroups */
permissions?: undefined;
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
slow_mode_delay?: undefined;
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
unrestrict_boost_count?: undefined;
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
message_auto_delete_time?: number;
/** True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. */
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
has_aggressive_anti_spam_enabled?: undefined;
/** True, if non-administrators can only get the list of bots and administrators in the chat */
has_hidden_members?: undefined;
/** True, if messages from the chat can't be forwarded to other chats */
has_protected_content?: true;
/** True, if new chat members will have access to old messages; available only to chat administrators */
has_visible_history?: undefined;
/** For supergroups, name of the group sticker set */
sticker_set_name?: undefined;
/** True, if the bot can change the group sticker set */
can_set_sticker_set?: undefined;
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
custom_emoji_sticker_set_name?: undefined;
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
linked_chat_id?: undefined;
/** For supergroups, the location to which the supergroup is connected */
location?: undefined;
}
/** Internal type holding properties that those private, supergroup, and channel chats returned from `getChat` share. */
interface NonGroupGetChat {
/** 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. */
interface NonPrivateGetChat {
/** Description, for groups, supergroups and channel chats. Returned only in getChat. */
/** Internal type for group chats */
interface GroupChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "group";
/** Title, for supergroups, channels and group chats */
title?: string;
/** Username, for private chats, supergroups and channels if available */
username?: undefined;
/** First name of the other party in a private chat */
first_name?: undefined;
/** Last name of the other party in a private chat */
last_name?: undefined;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: undefined;
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
accent_color_id: number;
/** The maximum number of reactions that can be set on a message in the chat */
max_reaction_count: number;
/** Chat photo */
photo?: ChatPhoto;
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
active_usernames?: undefined;
/** For private chats, the date of birth of the user */
birthdate?: undefined;
/** For private chats with business accounts, the intro of the business */
business_intro?: undefined;
/** For private chats with business accounts, the location of the business */
business_location?: undefined;
/** For private chats with business accounts, the opening hours of the business */
business_opening_hours?: undefined;
/** For private chats, the personal channel of the user */
personal_chat?: undefined;
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
available_reactions?: ReactionType[];
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
background_custom_emoji_id?: string;
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
profile_accent_color_id?: number;
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
profile_background_custom_emoji_id?: string;
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
emoji_status_custom_emoji_id?: string;
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
emoji_status_expiration_date?: number;
/** Bio of the other party in a private chat */
bio?: undefined;
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
has_private_forwards?: undefined;
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
has_restricted_voice_and_video_messages?: undefined;
/** True, if users need to join the supergroup before they can send messages */
join_to_send_messages?: undefined;
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
join_by_request?: undefined;
/** Description, for groups, supergroups and channel chats */
description?: string;
/** Primary invite link, for groups, supergroups and channel chats. Returned only in getChat. */
/** Primary invite link, for groups, supergroups and channel chats */
invite_link?: string;
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat. */
available_reactions?: ReactionType[];
}
/** Internal type holding properties that those group and supergroup chats returned from `getChat` share. */
interface MultiUserGetChat {
/** Default chat member permissions, for groups and supergroups. Returned only in getChat. */
/** The most recent pinned message (by sending date) */
pinned_message?: Message;
/** Default chat member permissions, for groups and supergroups */
permissions?: ChatPermissions;
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
slow_mode_delay?: undefined;
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
unrestrict_boost_count?: undefined;
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
message_auto_delete_time?: number;
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
has_aggressive_anti_spam_enabled?: undefined;
/** True, if non-administrators can only get the list of bots and administrators in the chat */
has_hidden_members?: true;
/** True, if messages from the chat can't be forwarded to other chats */
has_protected_content?: true;
/** True, if new chat members will have access to old messages; available only to chat administrators */
has_visible_history?: true;
/** For supergroups, name of the group sticker set */
sticker_set_name?: undefined;
/** True, if the bot can change the group sticker set */
can_set_sticker_set?: true;
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
custom_emoji_sticker_set_name?: undefined;
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
linked_chat_id?: undefined;
/** For supergroups, the location to which the supergroup is connected */
location?: undefined;
}
/** Internal type holding properties that those private and channel chats returned from `getChat` share. */
interface NonMultiUserGetChat {
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. */
/** Internal type for supergroup chats */
interface SupergroupChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "supergroup";
/** Title, for supergroups, channels and group chats */
title?: string;
/** Username, for private chats, supergroups and channels if available */
username?: string;
/** First name of the other party in a private chat */
first_name?: undefined;
/** Last name of the other party in a private chat */
last_name?: undefined;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: true;
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
accent_color_id: number;
/** Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat. */
/** The maximum number of reactions that can be set on a message in the chat */
max_reaction_count: number;
/** Chat photo */
photo?: ChatPhoto;
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
active_usernames?: string[];
/** For private chats, the date of birth of the user */
birthdate?: undefined;
/** For private chats with business accounts, the intro of the business */
business_intro?: undefined;
/** For private chats with business accounts, the location of the business */
business_location?: undefined;
/** For private chats with business accounts, the opening hours of the business */
business_opening_hours?: undefined;
/** For private chats, the personal channel of the user */
personal_chat?: undefined;
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
available_reactions?: ReactionType[];
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
background_custom_emoji_id?: string;
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat. */
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
profile_accent_color_id?: number;
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
profile_background_custom_emoji_id?: string;
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
emoji_status_custom_emoji_id?: string;
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat. */
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
emoji_status_expiration_date?: number;
}
/** Internal type holding properties that those supergroup and channel chats returned from `getChat` share. */
interface LargeGetChat {
/** 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 getChat. */
linked_chat_id?: number;
}
/** Internal type representing private chats returned from `getChat`. */
interface PrivateGetChat extends PrivateChat, GetChat, NonGroupGetChat, NonMultiUserGetChat {
/** For private chats, the date of birth of the user. Returned only in getChat. */
birthdate?: Birthdate;
/** For private chats with business accounts, the intro of the business. Returned only in getChat. */
business_intro?: BusinessIntro;
/** For private chats with business accounts, the location of the business. Returned only in getChat. */
business_location?: BusinessLocation;
/** For private chats with business accounts, the opening hours of the business. Returned only in getChat. */
business_opening_hours?: BusinessOpeningHours;
/** For private chats, the personal channel of the user. Returned only in getChat. */
personal_chat?: Chat.ChannelChat;
/** Bio of the other party in a private chat. Returned only in getChat. */
/** Bio of the other party in a private chat */
bio?: string;
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat. */
has_private_forwards?: true;
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat. */
has_restricted_voice_and_video_messages?: true;
}
/** Internal type representing group chats returned from `getChat`. */
interface GroupGetChat extends GroupChat, GetChat, NonPrivateGetChat, MultiUserGetChat {
}
/** Internal type representing supergroup chats returned from `getChat`. */
interface SupergroupGetChat extends SupergroupChat, GetChat, NonGroupGetChat, NonPrivateGetChat, MultiUserGetChat, LargeGetChat {
/** True, if users need to join the supergroup before they can send messages. Returned only in getChat. */
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
has_private_forwards?: undefined;
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
has_restricted_voice_and_video_messages?: undefined;
/** True, if users need to join the supergroup before they can send messages */
join_to_send_messages?: true;
/** True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat. */
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
join_by_request?: true;
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat. */
/** Description, for groups, supergroups and channel chats */
description?: string;
/** Primary invite link, for groups, supergroups and channel chats */
invite_link?: string;
/** The most recent pinned message (by sending date) */
pinned_message?: Message;
/** Default chat member permissions, for groups and supergroups */
permissions?: ChatPermissions;
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
slow_mode_delay?: number;
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in getChat. */
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
unrestrict_boost_count?: number;
/** True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat. */
has_visible_history?: boolean;
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat. */
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
message_auto_delete_time?: number;
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
has_aggressive_anti_spam_enabled?: true;
/** For supergroups, name of group sticker set. Returned only in getChat. */
/** True, if non-administrators can only get the list of bots and administrators in the chat */
has_hidden_members?: true;
/** True, if messages from the chat can't be forwarded to other chats */
has_protected_content?: true;
/** True, if new chat members will have access to old messages; available only to chat administrators */
has_visible_history?: true;
/** For supergroups, name of the group sticker set */
sticker_set_name?: string;
/** True, if the bot can change the group sticker set. Returned only in getChat. */
/** True, if the bot can change the group sticker set */
can_set_sticker_set?: true;
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in getChat. */
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
custom_emoji_sticker_set_name?: string;
/** For supergroups, the location to which the supergroup is connected. Returned only in getChat. */
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
linked_chat_id?: number;
/** For supergroups, the location to which the supergroup is connected */
location?: ChatLocation;
}
/** Internal type representing channel chats returned from `getChat`. */
interface ChannelGetChat extends ChannelChat, GetChat, NonGroupGetChat, NonPrivateGetChat, NonMultiUserGetChat, LargeGetChat {
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat. */
/** Internal type for channel chats */
interface ChannelChat {
/** Unique identifier for this chat. */
id: number;
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
type: "channel";
/** Title, for supergroups, channels and group chats */
title?: string;
/** Username, for private chats, supergroups and channels if available */
username?: string;
/** First name of the other party in a private chat */
first_name?: undefined;
/** Last name of the other party in a private chat */
last_name?: undefined;
/** True, if the supergroup chat is a forum (has topics enabled) */
is_forum?: undefined;
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
accent_color_id: number;
/** The maximum number of reactions that can be set on a message in the chat */
max_reaction_count: number;
/** Chat photo */
photo?: ChatPhoto;
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
active_usernames?: string[];
/** For private chats, the date of birth of the user */
birthdate?: undefined;
/** For private chats with business accounts, the intro of the business */
business_intro?: undefined;
/** For private chats with business accounts, the location of the business */
business_location?: undefined;
/** For private chats with business accounts, the opening hours of the business */
business_opening_hours?: undefined;
/** For private chats, the personal channel of the user */
personal_chat?: undefined;
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
available_reactions?: ReactionType[];
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
background_custom_emoji_id?: string;
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
profile_accent_color_id?: number;
/** Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat. */
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
profile_background_custom_emoji_id?: string;
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
emoji_status_custom_emoji_id?: string;
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
emoji_status_expiration_date?: number;
/** Bio of the other party in a private chat */
bio?: undefined;
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
has_private_forwards?: undefined;
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
has_restricted_voice_and_video_messages?: undefined;
/** True, if users need to join the supergroup before they can send messages */
join_to_send_messages?: true;
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
join_by_request?: undefined;
/** Description, for groups, supergroups and channel chats */
description?: string;
/** Primary invite link, for groups, supergroups and channel chats */
invite_link?: string;
/** The most recent pinned message (by sending date) */
pinned_message?: Message;
/** Default chat member permissions, for groups and supergroups */
permissions?: undefined;
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
slow_mode_delay?: undefined;
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
unrestrict_boost_count?: undefined;
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
message_auto_delete_time?: number;
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
has_aggressive_anti_spam_enabled?: undefined;
/** True, if non-administrators can only get the list of bots and administrators in the chat */
has_hidden_members?: undefined;
/** True, if messages from the chat can't be forwarded to other chats */
has_protected_content?: true;
/** True, if new chat members will have access to old messages; available only to chat administrators */
has_visible_history?: undefined;
/** For supergroups, name of the group sticker set */
sticker_set_name?: undefined;
/** True, if the bot can change the group sticker set */
can_set_sticker_set?: undefined;
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
custom_emoji_sticker_set_name?: undefined;
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
linked_chat_id?: number;
/** For supergroups, the location to which the supergroup is connected */
location?: undefined;
}
}
/** This object represents a chat. */
export type Chat = Chat.PrivateChat | Chat.GroupChat | Chat.SupergroupChat | Chat.ChannelChat;
/** This object represents a Telegram user or bot that was returned by `getChat`. */
export type ChatFromGetChat = Chat.PrivateGetChat | Chat.GroupGetChat | Chat.SupergroupGetChat | Chat.ChannelGetChat;
/** This object contains full information about a chat. */
export type ChatFullInfo = ChatFullInfo.PrivateChat | ChatFullInfo.GroupChat | ChatFullInfo.SupergroupChat | ChatFullInfo.ChannelChat;
/** @deprecated use ChatFullInfo instead */
export type ChatFromGetChat = ChatFullInfo;
/** This object represent a user's profile pictures. */

@@ -260,3 +551,3 @@ export interface UserProfilePhotos {

can_post_stories: boolean;
/** True, if the administrator can edit stories posted by other users */
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
can_edit_stories: boolean;

@@ -288,2 +579,4 @@ /** True, if the administrator can delete stories posted by other users */

invite_link?: ChatInviteLink;
/** True, if the user joined the chat after sending a direct join request without using an invite link without using an invite link and being approved by an administrator */
via_join_request?: boolean;
/** True, if the user joined the chat via a chat folder invite link */

@@ -337,3 +630,3 @@ via_chat_folder_invite_link?: boolean;

can_post_stories: boolean;
/** True, if the administrator can edit stories posted by other users */
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
can_edit_stories: boolean;

@@ -461,2 +754,3 @@ /** True, if the administrator can delete stories posted by other users */

}
/** Describes the birthdate of a user. */
export interface Birthdate {

@@ -470,2 +764,3 @@ /** Day of the user's birth; 1-31 */

}
/** Contains information about the start page settings of a Telegram Business account. */
export interface BusinessIntro {

@@ -479,2 +774,3 @@ /** Title text of the business intro */

}
/** Contains information about the location of a Telegram Business account. */
export interface BusinessLocation {

@@ -486,8 +782,10 @@ /** Address of the business */

}
/** Describes an interval of time during which a business is open. */
export interface BusinessOpeningHoursInterval {
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 24 60 */
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60 */
opening_minute: number;
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 24 60 */
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60 */
closing_minute: number;
}
/** Describes the opening hours of a business. */
export interface BusinessOpeningHours {

@@ -610,4 +908,4 @@ /** Unique name of the time zone for which the opening hours are defined */

chat: Chat.PrivateChat;
/** A JSON-serialized list of identifiers of deleted messages in the chat of the business account */
/** The list of identifiers of deleted messages in the chat of the business account */
message_ids: number[];
}

@@ -18,7 +18,7 @@ import type { ChatAdministratorRights, User } from "./manage.js";

interface CallbackButton extends AbstractInlineKeyboardButton {
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account. */
callback_data: string;
}
interface WebAppButton extends AbstractInlineKeyboardButton {
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. */
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account. */
web_app: WebAppInfo;

@@ -31,3 +31,3 @@ }

interface SwitchInlineButton extends AbstractInlineKeyboardButton {
/** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. */
/** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account. */
switch_inline_query: string;

@@ -38,7 +38,7 @@ }

This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. */
This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account. */
switch_inline_query_current_chat: string;
}
interface SwitchInlineChosenChatButton extends AbstractInlineKeyboardButton {
/** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field */
/** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account. */
switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat;

@@ -110,3 +110,3 @@ }

}
/** This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). */
/** This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
export interface ReplyKeyboardMarkup {

@@ -165,3 +165,3 @@ /** Array of button rows, each represented by an Array of KeyboardButton objects */

}
/** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). */
/** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
export interface ReplyKeyboardRemove {

@@ -175,3 +175,3 @@ /** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) */

}
/** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
/** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account.

@@ -208,7 +208,7 @@ Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:

max_quantity?: number;
/** Pass True to request the users' first and last name */
/** Pass True to request the users' first and last names */
request_name?: boolean;
/** Pass True to request the users' username */
/** Pass True to request the users' usernames */
request_username?: boolean;
/** Pass True to request the users' photo */
/** Pass True to request the users' photos */
request_photo?: boolean;

@@ -215,0 +215,0 @@ }

{
"name": "@grammyjs/types",
"version": "3.6.2",
"version": "3.7.0",
"description": "Telegram Bot API type declarations for grammY",

@@ -5,0 +5,0 @@ "main": "mod.js",

@@ -42,3 +42,3 @@ import type { ChosenInlineResult, InlineQuery } from "./inline.js";

business_connection?: BusinessConnection;
/** New non-service message from a connected business account */
/** New message from a connected business account */
business_message?: Message & Update.Private;

@@ -45,0 +45,0 @@ /** New version of a message from a connected business account */

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc