Skip to content

Commit 6856c53

Browse files
committed
getMe method
1 parent 135ef6e commit 6856c53

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/telegram_api.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,4 +358,14 @@ export default class TelegramApi {
358358
const url = this.getApiUrl(botApi, 'answerPreCheckoutQuery', data);
359359
return await this.fetchAndLog(url, 'answerPreCheckoutQuery', data);
360360
}
361+
362+
/**
363+
* Get basic information about the bot
364+
* @param botApi - full URL to the telegram API without slug
365+
* @returns Promise with the API response
366+
*/
367+
async getMe(botApi: string): Promise<Response> {
368+
const url = this.getApiUrl(botApi, 'getMe', {});
369+
return await this.fetchAndLog(url, 'getMe', {});
370+
}
361371
}

0 commit comments

Comments
 (0)