1.0.6 • Published 6 years ago

telegram-post-bot v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Telegram post bot

Bot that posts messages to telegram channel

Usage

const bot = new TelegramPostBot('<token>');
bot.sendMessage('@channelusername', '<b>message</b> <a href="http://www.example.com/">inline URL</a>', 'HTML', false);

Documentation

Table of Contents

TelegramPostBot

Class represents telegram bot

Parameters

  • token string telegram bot's authentication token

sendMessage

Send message to telegram channel

Parameters

  • chatId {string} - unique identifier for the target chat or username of the target channel (id or @username)
  • text {string} - text of message
  • parseMode {string} - mode: Markdown or HTML to show bold/italic text and inline URLS in message
  • webpagePreviewOff {boolean} - true to disable link previews

ErrorBadRequest

Extends Error

Class represents custom error for Bad Request response

Parameters

  • message (string | null) error message (optional, default null)
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago