mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-22 18:07:16 +00:00
jsdoc2md class constructor #90
This commit is contained in:
parent
7f278ead1f
commit
b46378d25b
@ -14,7 +14,16 @@ const URL = require('url');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const pump = require('pump');
|
const pump = require('pump');
|
||||||
|
|
||||||
/**
|
class TelegramBot extends EventEmitter {
|
||||||
|
|
||||||
|
// Telegram message events
|
||||||
|
static messageTypes = [
|
||||||
|
'text', 'audio', 'document', 'photo', 'sticker', 'video', 'voice', 'contact',
|
||||||
|
'location', 'new_chat_participant', 'left_chat_participant', 'new_chat_title',
|
||||||
|
'new_chat_photo', 'delete_chat_photo', 'group_chat_created'
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
* Both request method to obtain messages are implemented. To use standard polling, set `polling: true`
|
* Both request method to obtain messages are implemented. To use standard polling, set `polling: true`
|
||||||
* on `options`. Notice that [webHook](https://core.telegram.org/bots/api#setwebhook) will need a SSL certificate.
|
* on `options`. Notice that [webHook](https://core.telegram.org/bots/api#setwebhook) will need a SSL certificate.
|
||||||
* Emits `message` when a message arrives.
|
* Emits `message` when a message arrives.
|
||||||
@ -31,15 +40,6 @@ const pump = require('pump');
|
|||||||
* @param {String} [options.webHook.cert] PEM certificate (public) to webHook server.
|
* @param {String} [options.webHook.cert] PEM certificate (public) to webHook server.
|
||||||
* @see https://core.telegram.org/bots/api
|
* @see https://core.telegram.org/bots/api
|
||||||
*/
|
*/
|
||||||
class TelegramBot extends EventEmitter {
|
|
||||||
|
|
||||||
// Telegram message events
|
|
||||||
static messageTypes = [
|
|
||||||
'text', 'audio', 'document', 'photo', 'sticker', 'video', 'voice', 'contact',
|
|
||||||
'location', 'new_chat_participant', 'left_chat_participant', 'new_chat_title',
|
|
||||||
'new_chat_photo', 'delete_chat_photo', 'group_chat_created'
|
|
||||||
];
|
|
||||||
|
|
||||||
constructor(token, options = {}) {
|
constructor(token, options = {}) {
|
||||||
super();
|
super();
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user