-
Notifications
You must be signed in to change notification settings - Fork 724
Closed
Labels
Description
This is added in v1.42, available with pip install rpa --upgrade
- look up @rpapybot and tap START to allow receiving messages
- use
r.telegram(id, message)to send a Telegram message - return True if message sent successfully and False otherwise
import rpa as r
r.telegram(id, message)Developer Notes
- this is done in pure Python 2/3 so above works without TagUI
- I'm hosting on my idle VPS server at https://tebel.org/rpapybot
(date & time, id, length of message is logged to prevent abuse) - if you wish to host on your server, modify from this source code
(more info on Telegram Bot API at https://core.telegram.org/bots)
# use the default VPS server that I host, or your own Telegram server that you host
r.telegram(1234567890, 'Sent using my VPS server endpoint https://tebel.org/rpapybot')
r.telegram(1234567890, 'Sent using your own hosted endpoint', 'https://your_endpoint')In addition, RPA for Python is a light and simple 1-file package with following functions written in pure Python 2/3 without Python dependencies or TagUI. They are great time-savers instead of Python users having to write their own.
load() - load text file
dump() - save text file
write() - append text file
ask() - ask for user input
wait() - wait for some time
check() - output conditionally
download() - file from URL
unzip() - unzip a zip file
run() - OS level commands
get_text() - between 2 markers
del_chars() - delete characters
