Socket
Socket
Sign inDemoInstall

simple-telegram-message

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple-telegram-message

send a telegram message to yourself, a friend or a channel with node.js


Version published
Weekly downloads
45
increased by4.65%
Maintainers
1
Install size
3.75 kB
Created
Weekly downloads
 

Readme

Source

simple-telegram-message

… aims to be a simple, dependency-less module that does one thing, and it does it well

send a telegram message to yourself, a friend or a channel with node.js

requirements

to get a your user id, search on telegram for the bot @userinfobot.

to get the telegram bot token, create a bot with the help of @BotFather and he will provide you with all the information you need :)

two step usage

npm i simple-telegram-message
const { sendMessageFor } = require('simple-telegram-message')
const sendMessage = sendMessageFor(process.env.TELEGRAM_TOKEN, 'user_id|channel_id')
sendMessage(`Hi from bot!`)

api

sendMessageFor

this function is the only one exported by simple-telegram-message, and it is used to create a new function (see sendMessage)

### sendMessage

sendMessage is the function returned by sendMessageFor.

it returns a promise that resolves when the message has been successfully sent, or rejects if the message failed.

help

reach out on twitter @christian_fei!

Keywords

FAQs

Last updated on 29 Aug 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc