0.1.0 ā¢ Published 3 years ago
telenoty v0.1.0
telenoty
š¢ Simple and Easy to emit notification via Telegram
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}
- More usage
- with Python
Create bot
Create Telegram bot
Get access token
- Send bot name and ID
- Copy access token (for registration)
Go to chat room
Get chat id
Send any message
and go to https://api.telegram.org/bot{ACCESS_TOKEN}/getUpdates
Copy chat id
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
0.1.0
3 years ago