mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-28 21:07:39 +00:00
Travis svg
This commit is contained in:
parent
c7f38aa889
commit
172578dd0e
18
README.md
18
README.md
@ -1,17 +1,19 @@
|
|||||||
|
[](https://travis-ci.org/yagop/telegram-bot-api)
|
||||||
|
|
||||||
* * *
|
* * *
|
||||||
|
|
||||||
## Class: TelegramBot
|
## Class: TelegramBot
|
||||||
NodeJS class for Telegram Bot API.
|
NodeJS class for Telegram Bot API.
|
||||||
|
|
||||||
Support for WebHooks and long polling. Emits `message` when message arrives.
|
Support for WebHooks and long polling. Emits `message` when message arrives.
|
||||||
|
|
||||||
### TelegramBot.getMe()
|
### TelegramBot.getMe()
|
||||||
|
|
||||||
Returns basic information about the bot in form of a `User` object.
|
Returns basic information about the bot in form of a `User` object.
|
||||||
|
|
||||||
**Returns**: `Promise`
|
**Returns**: `Promise`
|
||||||
|
|
||||||
### TelegramBot.setWebHook(url)
|
### TelegramBot.setWebHook(url)
|
||||||
|
|
||||||
Specify a url to receive incoming updates via an outgoing webHook.
|
Specify a url to receive incoming updates via an outgoing webHook.
|
||||||
|
|
||||||
@ -20,7 +22,7 @@ Specify a url to receive incoming updates via an outgoing webHook.
|
|||||||
**url**: `String`, URL
|
**url**: `String`, URL
|
||||||
|
|
||||||
|
|
||||||
### TelegramBot.getUpdates(timeout, limit, offset)
|
### TelegramBot.getUpdates(timeout, limit, offset)
|
||||||
|
|
||||||
Use this method to receive incoming updates using long polling
|
Use this method to receive incoming updates using long polling
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ Use this method to receive incoming updates using long polling
|
|||||||
|
|
||||||
**Returns**: `Promise`, Updates
|
**Returns**: `Promise`, Updates
|
||||||
|
|
||||||
### TelegramBot.sendMessage(chatId, text, options)
|
### TelegramBot.sendMessage(chatId, text, options)
|
||||||
|
|
||||||
Send text message.
|
Send text message.
|
||||||
|
|
||||||
@ -48,7 +50,7 @@ Send text message.
|
|||||||
|
|
||||||
**Returns**: `Promise`
|
**Returns**: `Promise`
|
||||||
|
|
||||||
### TelegramBot.forwardMessage(chatId, fromChatId, messageId)
|
### TelegramBot.forwardMessage(chatId, fromChatId, messageId)
|
||||||
|
|
||||||
Forward messages of any kind.
|
Forward messages of any kind.
|
||||||
|
|
||||||
@ -63,7 +65,7 @@ original message was sent
|
|||||||
|
|
||||||
**Returns**: `Promise`
|
**Returns**: `Promise`
|
||||||
|
|
||||||
### TelegramBot.sendPhoto(chatId, photo, options)
|
### TelegramBot.sendPhoto(chatId, photo, options)
|
||||||
|
|
||||||
Send photo
|
Send photo
|
||||||
|
|
||||||
@ -78,7 +80,7 @@ also be a `file_id` previously uploaded
|
|||||||
|
|
||||||
**Returns**: `Promise`
|
**Returns**: `Promise`
|
||||||
|
|
||||||
### TelegramBot.sendAudio(chatId, audio, options)
|
### TelegramBot.sendAudio(chatId, audio, options)
|
||||||
|
|
||||||
Send audio
|
Send audio
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user