https://github.com/lasalefamine/channel-telegram-bot
Bot for Telegram to simply send actions to a channel (Telebot wrapper)
https://github.com/lasalefamine/channel-telegram-bot
channel-telegram-bot channelname telebot telegram
Last synced: about 1 month ago
JSON representation
Bot for Telegram to simply send actions to a channel (Telebot wrapper)
- Host: GitHub
- URL: https://github.com/lasalefamine/channel-telegram-bot
- Owner: LasaleFamine
- License: mit
- Created: 2017-02-14T21:49:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-14T21:54:18.000Z (over 9 years ago)
- Last Synced: 2025-01-28T14:38:42.183Z (over 1 year ago)
- Topics: channel-telegram-bot, channelname, telebot, telegram
- Language: JavaScript
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# channel-telegram-bot [](https://travis-ci.org/LasaleFamine/channel-telegram-bot)
> Send an ***action*** to an administered channel.
Basically a wrapper of [Telebot](https://github.com/kosmodrey/telebot/) but that only sends a actions to a channel of your choice. As an NPM package :package:
## Install
```
$ yarn add channel-telegram-bot
```
## Usage
```js
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
:building_construction:
## License
MIT © [LasaleFamine](https://github.com/lasalefamine)