telenoty

0.1.0 • Public • Published

telenoty

📢 Simple and Easy to emit notification via Telegram

npm version ts

Installation

npm install -g telenoty

Usage

  • Required - Telegram Bot
    • Create your Telegram bot
    • Get access token
    • Get chat id
    • Regist and enjoy!
# Regist bot information (save on ~/.telenoty)
# --regist, -r
telenoty --regist {BOT_TOKEN} {CHAT_ID}

# Send message
# --message, -m
telenoty --message {MESSAGE}

Create bot

  1. Create Telegram bot

  2. Get access token

    • Send bot name and ID
    • Copy access token (for registration)
    • Go to chat room
  3. Get chat id

    • Send any message
    • Copy chat id
  4. Regist and enjoy!

with Python

import subprocess

def send_message(message):
    return subprocess.call(['telenoty', '--message', message], \
        stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)

result = send_message('test')
if result == 0:
  print('success')
else:
  print('fail')

Devlopment

# Install dependencies
npm i

# Build for production
npm run build

# Test
node dist/telenoty.js

License

MIT

Package Sidebar

Install

npm i telenoty

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

916 kB

Total Files

16

Last publish

Collaborators

  • ghlee