How to use the node-telegram-bot-api.prototype function in node-telegram-bot-api

To help you get started, we’ve selected a few node-telegram-bot-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github telegram-ru / jobs-bot / bot.js View on Github external
const debug = require('debug')('jobs-bot:bot');
const TelegramBot = require('node-telegram-bot-api');

TelegramBot.prototype.deleteMessage = function deleteMessage(chatId, messageId, form = {}) {
  form.chat_id = chatId;
  form.message_id = messageId;
  return this._request('deleteMessage', { form });
};

debug('token', process.env.APP_BOT_TOKEN.split(':')[0]);

const bot = new TelegramBot(process.env.APP_BOT_TOKEN, { polling: true });

module.exports = bot;

node-telegram-bot-api

Telegram Bot API

MIT
Latest version published 7 months ago

Package Health Score

78 / 100
Full package analysis

Popular node-telegram-bot-api functions