channel-telegram-bot

1.0.0 • Public • Published

channel-telegram-bot Build Status

Send an action to an administered channel.

Basically a wrapper of Telebot but that only sends a actions to a channel of your choice. As an NPM package 📦

Install

$ yarn add channel-telegram-bot

Usage

const channelBot = require('channel-telegram-bot');
const token = 'YOUR_TELEGRAM_BOT_TOKEN';
 
const niceEmoji = '🥋 '
channelBot.sendMessage('@your_awesome_channel_name', `Prepare yourself ${niceEmoji}`, token)
    .then(res => console.log(res))
    .catch(err => console.error(err))

API

The token is supported also if exported as env variable as CHANNELBOT_TOKEN:

$ export CHANNELBOT_TOKEN=YOUR_TELEGRAM_BOT_TOKEN

.sendMessage(channelName, message, [token])

channelName

Type: string

Name of your channel.

message

Type: string

Message to send.

token (|| process.env.CHANNELBOT_TOKEN)

Type: string

Token of your bot.

More SOON

🏗

License

MIT © LasaleFamine

Readme

Keywords

none

Package Sidebar

Install

npm i channel-telegram-bot

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lasalefamine