@types/node-telegram-bot-api
Advanced tools
Comparing version 0.30.3 to 0.30.4
@@ -39,2 +39,30 @@ // Type definitions for node-telegram-bot-api 0.30 | ||
type MessageType = | ||
'text' | | ||
'animation' | | ||
'audio' | | ||
'channel_chat_created' | | ||
'contact' | | ||
'delete_chat_photo' | | ||
'document' | | ||
'game' | | ||
'group_chat_created' | | ||
'invoice' | | ||
'left_chat_member' | | ||
'location' | | ||
'migrate_from_chat_id' | | ||
'migrate_to_chat_id' | | ||
'new_chat_members' | | ||
'new_chat_photo' | | ||
'new_chat_title' | | ||
'passport_data' | | ||
'photo' | | ||
'pinned_message' | | ||
'sticker' | | ||
'successful_payment' | | ||
'supergroup_chat_created' | | ||
'video' | | ||
'video_note' | | ||
'voice'; | ||
type MessageEntityType = 'mention' | 'hashtag' | 'bot_command' | 'url' | 'email' | 'bold' | 'italic' | 'code' | 'pre' | 'text_link' | 'text_mention'; | ||
@@ -891,2 +919,6 @@ | ||
} | ||
interface Metadata { | ||
type?: MessageType; | ||
} | ||
} | ||
@@ -1036,4 +1068,241 @@ | ||
answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, options?: TelegramBot.AnswerPreCheckoutQueryOptions): Promise<boolean>; | ||
addListener(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
addListener(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
addListener(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
addListener(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
addListener( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
addListener(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
addListener(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
addListener(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
on(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
on(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
on(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
on(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
on( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
on(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
on(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
on(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
once(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
once(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
once(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
once(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
once( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
once(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
once(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
once(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
prependListener(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
prependListener(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
prependListener(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
prependListener(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
prependListener( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
prependListener(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
prependListener(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
prependListener(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
prependOnceListener(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
prependOnceListener(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
prependOnceListener(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
prependOnceListener(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
prependOnceListener( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
prependOnceListener(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
prependOnceListener(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
prependOnceListener(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
removeListener(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
removeListener(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
removeListener(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
removeListener(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
removeListener( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
removeListener(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
removeListener(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
removeListener(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
off(event: TelegramBot.MessageType | 'message', listener: (message: TelegramBot.Message, metadata: TelegramBot.Metadata) => void): this; | ||
off(event: 'callback_query', listener: (query: TelegramBot.CallbackQuery) => void): this; | ||
off(event: 'inline_query', listener: (query: TelegramBot.InlineQuery) => void): this; | ||
off(event: 'chosen_inline_result', listener: (result: TelegramBot.ChosenInlineResult) => void): this; | ||
off( | ||
event: 'channel_post' | 'edited_message' | 'edited_message_text' | 'edited_message_caption' | 'edited_channel_post' | 'edited_channel_post_text' | 'edited_channel_post_caption', | ||
listener: (message: TelegramBot.Message) => void | ||
): this; | ||
off(event: 'shipping_query', listener: (query: TelegramBot.ShippingQuery) => void): this; | ||
off(event: 'pre_checkout_query', listener: (query: TelegramBot.PreCheckoutQuery) => void): this; | ||
off(event: 'polling_error' | 'webhook_error' | 'error', listener: (error: Error) => void): this; | ||
removeAllListeners( | ||
event: | ||
TelegramBot.MessageType | | ||
'message' | | ||
'callback_query' | | ||
'inline_query' | | ||
'chosen_inline_result' | | ||
'channel_post' | | ||
'edited_message' | | ||
'edited_message_text' | | ||
'edited_message_caption' | | ||
'edited_channel_post' | | ||
'edited_channel_post_text' | | ||
'edited_channel_post_caption' | | ||
'shipping_query' | | ||
'pre_checkout_query' | | ||
'polling_error' | | ||
'webhook_error' | | ||
'error' | ||
): this; | ||
listeners( | ||
event: | ||
TelegramBot.MessageType | | ||
'message' | | ||
'callback_query' | | ||
'inline_query' | | ||
'chosen_inline_result' | | ||
'channel_post' | | ||
'edited_message' | | ||
'edited_message_text' | | ||
'edited_message_caption' | | ||
'edited_channel_post' | | ||
'edited_channel_post_text' | | ||
'edited_channel_post_caption' | | ||
'shipping_query' | | ||
'pre_checkout_query' | | ||
'polling_error' | | ||
'webhook_error' | | ||
'error' | ||
): Array<(data: any, metadata?: TelegramBot.Metadata) => void>; | ||
rawListeners( | ||
event: | ||
TelegramBot.MessageType | | ||
'message' | | ||
'callback_query' | | ||
'inline_query' | | ||
'chosen_inline_result' | | ||
'channel_post' | | ||
'edited_message' | | ||
'edited_message_text' | | ||
'edited_message_caption' | | ||
'edited_channel_post' | | ||
'edited_channel_post_text' | | ||
'edited_channel_post_caption' | | ||
'shipping_query' | | ||
'pre_checkout_query' | | ||
'polling_error' | | ||
'webhook_error' | | ||
'error' | ||
): Array<(data: any, metadata?: TelegramBot.Metadata) => void>; | ||
eventNames(): Array< | ||
TelegramBot.MessageType | | ||
'message' | | ||
'callback_query' | | ||
'inline_query' | | ||
'chosen_inline_result' | | ||
'channel_post' | | ||
'edited_message' | | ||
'edited_message_text' | | ||
'edited_message_caption' | | ||
'edited_channel_post' | | ||
'edited_channel_post_text' | | ||
'edited_channel_post_caption' | | ||
'shipping_query' | | ||
'pre_checkout_query' | | ||
'polling_error' | | ||
'webhook_error' | | ||
'error' | ||
>; | ||
listenerCount( | ||
event: | ||
TelegramBot.MessageType | | ||
'message' | | ||
'callback_query' | | ||
'inline_query' | | ||
'chosen_inline_result' | | ||
'channel_post' | | ||
'edited_message' | | ||
'edited_message_text' | | ||
'edited_message_caption' | | ||
'edited_channel_post' | | ||
'edited_channel_post_text' | | ||
'edited_channel_post_caption' | | ||
'shipping_query' | | ||
'pre_checkout_query' | | ||
'polling_error' | | ||
'webhook_error' | | ||
'error' | ||
): number; | ||
} | ||
export = TelegramBot; |
{ | ||
"name": "@types/node-telegram-bot-api", | ||
"version": "0.30.3", | ||
"version": "0.30.4", | ||
"description": "TypeScript definitions for node-telegram-bot-api", | ||
@@ -34,2 +34,3 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
@@ -41,8 +42,7 @@ "type": "git", | ||
"dependencies": { | ||
"@types/events": "*", | ||
"@types/request": "*", | ||
"@types/node": "*" | ||
"@types/node": "*", | ||
"@types/request": "*" | ||
}, | ||
"typesPublisherContentHash": "8462d6bbd41ec4452b3796d0b2560eefda1c325d40554166bcfd57f19b2b7b42", | ||
"typesPublisherContentHash": "97e0de0a0e6f64b80bd5ebf07d6dfa3fd830351b0abf6037018c1759293e3a93", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,4 +11,4 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 05 Sep 2018 16:21:55 GMT | ||
* Dependencies: events, stream, https, request, node | ||
* Last updated: Sat, 19 Jan 2019 01:04:20 GMT | ||
* Dependencies: @types/request, @types/node | ||
* Global values: none | ||
@@ -15,0 +15,0 @@ |
45333
2
1048
- Removed@types/events@*
- Removed@types/events@3.0.3(transitive)