telegram-bot-api-nodejs
Advanced tools
Comparing version 1.0.48 to 1.0.49
@@ -1076,2 +1076,5 @@ export type ChatType = "private" | "group" | "supergroup" | "channel"; | ||
export declare function answerCallbackQuery(token: string, payload: AnswerCallbackQueryOptions, signal: AbortSignal): Promise<File>; | ||
export declare function leaveChat(token: string, payload: { | ||
chat_id: string; | ||
}, signal: AbortSignal): Promise<true>; | ||
export declare function getChat(token: string, payload: { | ||
@@ -1078,0 +1081,0 @@ chat_id: string; |
@@ -154,2 +154,10 @@ import { readFileSync } from "fs"; | ||
} | ||
export function leaveChat(token, payload, signal) { | ||
return fetch(`https://api.telegram.org/bot${token}/leaveChat`, { | ||
method: "POST", | ||
body: JSON.stringify(payload), | ||
headers, | ||
signal | ||
}).then((parseResponse)); | ||
} | ||
export function getChat(token, payload, signal) { | ||
@@ -156,0 +164,0 @@ return fetch(`https://api.telegram.org/bot${token}/getChat`, { |
{ | ||
"name": "telegram-bot-api-nodejs", | ||
"version": "1.0.48", | ||
"version": "1.0.49", | ||
"description": "Telegram Bot API client for nodejs", | ||
@@ -5,0 +5,0 @@ "type": "module", |
79414
1827
22