New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/node-telegram-bot-api

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node-telegram-bot-api - npm Package Compare versions

Comparing version 0.53.0 to 0.53.1

146

node-telegram-bot-api/index.d.ts

@@ -31,3 +31,3 @@ // Type definitions for node-telegram-bot-api 0.53

id: number;
chatId: number | string;
chatId: ChatId;
messageId: number | string;

@@ -1111,2 +1111,44 @@ callback(msg: Message): void;

}
type ChatId = number | string;
interface BotCommandScopeDefault {
type: "default";
}
interface BotCommandScopeAllPrivateChats {
type: "all_private_chats";
}
interface BotCommandScopeAllGroupChats {
type: "all_group_chats";
}
interface BotCommandScopeAllChatAdministrators {
type: "all_chat_administrators";
}
interface BotCommandScopeChat {
type: "chat";
chat_id: ChatId;
}
interface BotCommandScopeChatAdministrators {
type: "chat_administrators";
chat_id: ChatId;
}
interface BotCommandScopeChatMember {
type: "chat_member";
chat_id: ChatId;
user_id: number;
}
type BotCommandScope = BotCommandScopeDefault |
BotCommandScopeAllPrivateChats |
BotCommandScopeAllGroupChats |
BotCommandScopeAllChatAdministrators |
BotCommandScopeChat |
BotCommandScopeChatAdministrators |
BotCommandScopeChatMember;
}

@@ -1145,23 +1187,23 @@

sendMessage(chatId: number | string, text: string, options?: TelegramBot.SendMessageOptions): Promise<TelegramBot.Message>;
sendMessage(chatId: TelegramBot.ChatId, text: string, options?: TelegramBot.SendMessageOptions): Promise<TelegramBot.Message>;
answerInlineQuery(inlineQueryId: string, results: ReadonlyArray<TelegramBot.InlineQueryResult>, options?: TelegramBot.AnswerInlineQueryOptions): Promise<boolean>;
forwardMessage(chatId: number | string, fromChatId: number | string, messageId: number | string, options?: TelegramBot.ForwardMessageOptions): Promise<TelegramBot.Message>;
forwardMessage(chatId: TelegramBot.ChatId, fromChatId: TelegramBot.ChatId, messageId: number | string, options?: TelegramBot.ForwardMessageOptions): Promise<TelegramBot.Message>;
copyMessage(chatId: number | string, fromChatId: number | string, messageId: number | string, options?: TelegramBot.CopyMessageOptions): Promise<TelegramBot.MessageId>;
copyMessage(chatId: TelegramBot.ChatId, fromChatId: TelegramBot.ChatId, messageId: number | string, options?: TelegramBot.CopyMessageOptions): Promise<TelegramBot.MessageId>;
sendPhoto(chatId: number | string, photo: string | Stream | Buffer, options?: TelegramBot.SendPhotoOptions): Promise<TelegramBot.Message>;
sendPhoto(chatId: TelegramBot.ChatId, photo: string | Stream | Buffer, options?: TelegramBot.SendPhotoOptions): Promise<TelegramBot.Message>;
sendAudio(chatId: number | string, audio: string | Stream | Buffer, options?: TelegramBot.SendAudioOptions): Promise<TelegramBot.Message>;
sendAudio(chatId: TelegramBot.ChatId, audio: string | Stream | Buffer, options?: TelegramBot.SendAudioOptions): Promise<TelegramBot.Message>;
sendAnimation(chatId: number | string, animation: string | Stream | Buffer, options?: TelegramBot.SendAnimationOptions): Promise<TelegramBot.Message>;
sendAnimation(chatId: TelegramBot.ChatId, animation: string | Stream | Buffer, options?: TelegramBot.SendAnimationOptions): Promise<TelegramBot.Message>;
sendDice(chatId: number | string, options?: TelegramBot.SendDiceOptions): Promise<TelegramBot.Message>;
sendDice(chatId: TelegramBot.ChatId, options?: TelegramBot.SendDiceOptions): Promise<TelegramBot.Message>;
sendDocument(chatId: number | string, doc: string | Stream | Buffer, options?: TelegramBot.SendDocumentOptions, fileOpts?: any): Promise<TelegramBot.Message>;
sendDocument(chatId: TelegramBot.ChatId, doc: string | Stream | Buffer, options?: TelegramBot.SendDocumentOptions, fileOpts?: any): Promise<TelegramBot.Message>;
sendMediaGroup(chatId: number | string, media: ReadonlyArray<TelegramBot.InputMedia>, options?: TelegramBot.SendMediaGroupOptions): Promise<TelegramBot.Message>;
sendMediaGroup(chatId: TelegramBot.ChatId, media: ReadonlyArray<TelegramBot.InputMedia>, options?: TelegramBot.SendMediaGroupOptions): Promise<TelegramBot.Message>;
sendPoll(chatId: number | string, question: string, pollOptions: ReadonlyArray<string>, options?: TelegramBot.SendPollOptions): Promise<TelegramBot.Message>;
sendPoll(chatId: TelegramBot.ChatId, question: string, pollOptions: ReadonlyArray<string>, options?: TelegramBot.SendPollOptions): Promise<TelegramBot.Message>;

@@ -1171,43 +1213,43 @@ // `messageId` was referred to as `pollId` in `node-telegram-bot-api/src/telegram.js`,

// see https://core.telegram.org/bots/api#stoppoll for more info.
stopPoll(chatId: number | string, messageId: number, options?: TelegramBot.StopPollOptions): Promise<TelegramBot.Poll>;
stopPoll(chatId: TelegramBot.ChatId, messageId: number, options?: TelegramBot.StopPollOptions): Promise<TelegramBot.Poll>;
sendSticker(chatId: number | string, sticker: string | Stream | Buffer, options?: TelegramBot.SendStickerOptions): Promise<TelegramBot.Message>;
sendSticker(chatId: TelegramBot.ChatId, sticker: string | Stream | Buffer, options?: TelegramBot.SendStickerOptions): Promise<TelegramBot.Message>;
sendVideo(chatId: number | string, video: string | Stream | Buffer, options?: TelegramBot.SendVideoOptions): Promise<TelegramBot.Message>;
sendVideo(chatId: TelegramBot.ChatId, video: string | Stream | Buffer, options?: TelegramBot.SendVideoOptions): Promise<TelegramBot.Message>;
sendVideoNote(chatId: number | string, videoNote: string | Stream | Buffer, options?: TelegramBot.SendVideoNoteOptions): Promise<TelegramBot.Message>;
sendVideoNote(chatId: TelegramBot.ChatId, videoNote: string | Stream | Buffer, options?: TelegramBot.SendVideoNoteOptions): Promise<TelegramBot.Message>;
sendVoice(chatId: number | string, voice: string | Stream | Buffer, options?: TelegramBot.SendVoiceOptions): Promise<TelegramBot.Message>;
sendVoice(chatId: TelegramBot.ChatId, voice: string | Stream | Buffer, options?: TelegramBot.SendVoiceOptions): Promise<TelegramBot.Message>;
sendChatAction(chatId: number | string, action: TelegramBot.ChatAction): Promise<boolean>;
sendChatAction(chatId: TelegramBot.ChatId, action: TelegramBot.ChatAction): Promise<boolean>;
kickChatMember(chatId: number | string, userId: string): Promise<boolean>;
kickChatMember(chatId: TelegramBot.ChatId, userId: string): Promise<boolean>;
unbanChatMember(chatId: number | string, userId: string): Promise<boolean>;
unbanChatMember(chatId: TelegramBot.ChatId, userId: string): Promise<boolean>;
restrictChatMember(chatId: number | string, userId: string, options?: TelegramBot.RestrictChatMemberOptions): Promise<boolean>;
restrictChatMember(chatId: TelegramBot.ChatId, userId: string, options?: TelegramBot.RestrictChatMemberOptions): Promise<boolean>;
promoteChatMember(chatId: number | string, userId: string, options?: TelegramBot.PromoteChatMemberOptions): Promise<boolean>;
promoteChatMember(chatId: TelegramBot.ChatId, userId: string, options?: TelegramBot.PromoteChatMemberOptions): Promise<boolean>;
exportChatInviteLink(chatId: number | string): Promise<string>;
exportChatInviteLink(chatId: TelegramBot.ChatId): Promise<string>;
createChatInviteLink(chatId: number | string): Promise<TelegramBot.ChatInviteLink>;
createChatInviteLink(chatId: TelegramBot.ChatId): Promise<TelegramBot.ChatInviteLink>;
editChatInviteLink(chatId: number | string, inviteLink: string): Promise<TelegramBot.ChatInviteLink>;
editChatInviteLink(chatId: TelegramBot.ChatId, inviteLink: string): Promise<TelegramBot.ChatInviteLink>;
revokeChatInviteLink(chatId: number | string, inviteLink: string): Promise<TelegramBot.ChatInviteLink>;
revokeChatInviteLink(chatId: TelegramBot.ChatId, inviteLink: string): Promise<TelegramBot.ChatInviteLink>;
setChatPhoto(chatId: number | string, photo: string | Stream | Buffer): Promise<boolean>;
setChatPhoto(chatId: TelegramBot.ChatId, photo: string | Stream | Buffer): Promise<boolean>;
deleteChatPhoto(chatId: number | string): Promise<boolean>;
deleteChatPhoto(chatId: TelegramBot.ChatId): Promise<boolean>;
setChatTitle(chatId: number | string, title: string): Promise<boolean>;
setChatTitle(chatId: TelegramBot.ChatId, title: string): Promise<boolean>;
setChatDescription(chatId: number | string, description: string): Promise<boolean>;
setChatDescription(chatId: TelegramBot.ChatId, description: string): Promise<boolean>;
pinChatMessage(chatId: number | string, messageId: string): Promise<boolean>;
pinChatMessage(chatId: TelegramBot.ChatId, messageId: string): Promise<boolean>;
unpinChatMessage(chatId: number | string): Promise<boolean>;
unpinChatMessage(chatId: TelegramBot.ChatId): Promise<boolean>;
unpinAllChatMessages(chatId: number | string): Promise<boolean>;
unpinAllChatMessages(chatId: TelegramBot.ChatId): Promise<boolean>;

@@ -1231,3 +1273,3 @@ answerCallbackQuery(callbackQueryId: string, options?: Partial<TelegramBot.AnswerCallbackQueryOptions>): Promise<boolean>;

sendLocation(chatId: number | string, latitude: number, longitude: number, options?: TelegramBot.SendLocationOptions): Promise<TelegramBot.Message>;
sendLocation(chatId: TelegramBot.ChatId, latitude: number, longitude: number, options?: TelegramBot.SendLocationOptions): Promise<TelegramBot.Message>;

@@ -1238,5 +1280,5 @@ editMessageLiveLocation(latitude: number, longitude: number, options?: TelegramBot.EditMessageLiveLocationOptions): Promise<TelegramBot.Message | boolean>;

sendVenue(chatId: number | string, latitude: number, longitude: number, title: string, address: string, options?: TelegramBot.SendVenueOptions): Promise<TelegramBot.Message>;
sendVenue(chatId: TelegramBot.ChatId, latitude: number, longitude: number, title: string, address: string, options?: TelegramBot.SendVenueOptions): Promise<TelegramBot.Message>;
sendContact(chatId: number | string, phoneNumber: string, firstName: string, options?: TelegramBot.SendContactOptions): Promise<TelegramBot.Message>;
sendContact(chatId: TelegramBot.ChatId, phoneNumber: string, firstName: string, options?: TelegramBot.SendContactOptions): Promise<TelegramBot.Message>;

@@ -1257,3 +1299,3 @@ getFile(fileId: string): Promise<TelegramBot.File>;

onReplyToMessage(chatId: number | string, messageId: number | string, callback: ((msg: TelegramBot.Message) => void)): number;
onReplyToMessage(chatId: TelegramBot.ChatId, messageId: number | string, callback: ((msg: TelegramBot.Message) => void)): number;

@@ -1264,17 +1306,17 @@ removeReplyListener(replyListenerId: number): TelegramBot.ReplyListener;

getChat(chatId: number | string): Promise<TelegramBot.Chat>;
getChat(chatId: TelegramBot.ChatId): Promise<TelegramBot.Chat>;
getChatAdministrators(chatId: number | string): Promise<TelegramBot.ChatMember[]>;
getChatAdministrators(chatId: TelegramBot.ChatId): Promise<TelegramBot.ChatMember[]>;
getChatMembersCount(chatId: number | string): Promise<number>;
getChatMembersCount(chatId: TelegramBot.ChatId): Promise<number>;
getChatMember(chatId: number | string, userId: string): Promise<TelegramBot.ChatMember>;
getChatMember(chatId: TelegramBot.ChatId, userId: string): Promise<TelegramBot.ChatMember>;
leaveChat(chatId: number | string): Promise<boolean>;
leaveChat(chatId: TelegramBot.ChatId): Promise<boolean>;
setChatStickerSet(chatId: number | string, stickerSetName: string): Promise<boolean>;
setChatStickerSet(chatId: TelegramBot.ChatId, stickerSetName: string): Promise<boolean>;
deleteChatStickerSet(chatId: number | string): Promise<boolean>;
deleteChatStickerSet(chatId: TelegramBot.ChatId): Promise<boolean>;
sendGame(chatId: number | string, gameShortName: string, options?: TelegramBot.SendGameOptions): Promise<TelegramBot.Message>;
sendGame(chatId: TelegramBot.ChatId, gameShortName: string, options?: TelegramBot.SendGameOptions): Promise<TelegramBot.Message>;

@@ -1285,5 +1327,5 @@ setGameScore(userId: string, score: number, options?: TelegramBot.SetGameScoreOptions): Promise<TelegramBot.Message | boolean>;

deleteMessage(chatId: number | string, messageId: string, options?: any): Promise<boolean>;
deleteMessage(chatId: TelegramBot.ChatId, messageId: string, options?: any): Promise<boolean>;
sendInvoice(chatId: number | string, title: string, description: string, payload: string, providerToken: string, startParameter: string, currency: string,
sendInvoice(chatId: TelegramBot.ChatId, title: string, description: string, payload: string, providerToken: string, startParameter: string, currency: string,
prices: ReadonlyArray<TelegramBot.LabeledPrice>, options?: TelegramBot.SendInvoiceOptions): Promise<TelegramBot.Message>;

@@ -1576,3 +1618,3 @@

setChatPermissions(
chatId: number | string,
chatId: TelegramBot.ChatId,
chatPermissions: TelegramBot.ChatPermissions

@@ -1582,3 +1624,3 @@ ): Promise<boolean>;

setChatAdministratorCustomTitle(
chatId: number | string,
chatId: TelegramBot.ChatId,
userId: string,

@@ -1590,5 +1632,11 @@ customTitle: string

setMyCommands(commands: TelegramBot.BotCommand[]): Promise<boolean>;
setMyCommands(
commands: TelegramBot.BotCommand[],
options?: {
language_code?: string,
scope?: TelegramBot.BotCommandScope
},
): Promise<boolean>;
}
export = TelegramBot;
{
"name": "@types/node-telegram-bot-api",
"version": "0.53.0",
"version": "0.53.1",
"description": "TypeScript definitions for node-telegram-bot-api",

@@ -71,4 +71,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-telegram-bot-api",

},
"typesPublisherContentHash": "27667c2d99da305551bc983de59e6cea5b9d95018af98e512a2fb862dd79a69f",
"typesPublisherContentHash": "656577d3c793fbe58ae3ea83cbfe8bf95e795921832177e8b214814fabeee98d",
"typeScriptVersion": "3.7"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 01 Oct 2021 17:01:20 GMT
* Last updated: Mon, 18 Oct 2021 21:01:23 GMT
* Dependencies: [@types/request](https://npmjs.com/package/@types/request), [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@ * Global values: none

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