-
Notifications
You must be signed in to change notification settings - Fork 47
Home
First you need to have a Telegram account with a Username
, It's a unique name that starts with @
, You can set it in the settings area of your Telegram if you haven't already.
Next you go to speak with the @BotFather to make a new bot that you'll use to interact with Transmission, Send the command /newbot
to the BotFather, He will ask you which name you want for your bot, choose anything you like, I will call mine Transmission
for clarity.
Then he will ask you about the username
you would like to choose for the bot, this username has to be unique and ends with bot
.
After that you'll get a message with your new bot URL and an HTTP API token.
Now you just execute transmission-telegram
and set the flag -token=
to the bot's token, and the flag -master=
to your own Telegram Username NOT the bot's username that ends with bot
e.g.
transmission-telegram -token=294691344:AAE0YNeGDlKnwNPG6XcXOPCe4EG5xpLEdYY -master=Adam
if your Transmission is running on http://localhost:9091/transmission/rpc
without requiring authentication, it will connect to it, you can now go to your bot and send /help
to get a list of commands.
Possible flags:
-
-token=
Bot tokenREQUIRED
. -
-master=
Your Telegram username, so the bot will answer only to you, you can specify more than one masterREQUIRED
. -
-url=
Set to transmission's RPC url, it has to be the full url, starts withhttp
and ends with/rpc
. -
-username=
Transmission's RPC username. -
-password=
Transmission's RPC password. -
-logfile=
Write logs to a file instead of STDOUT. -
-transmission-logfile=
Point it to Transmission's log file to monitor torrents completion to notify upon them, Starttransmission-daemon
with the--logfile
to get a log file. -
-no-live
A flag to turn off keeping the info live by updating some of the sent messages for a period of time, Helps if you're reaching some requesting limits.
These are the commands that will be available for you through the bot
-
list
orli
Lists all the torrents, takes an optional argument which is a query to list only torrents that has a tracker matches the query, or some of it. -
head
orhe
Lists the first n number of torrents, n defaults to 5 if no argument is provided. -
tail
orta
Lists the last n number of torrents, n defaults to 5 if no argument is provided. -
down
ordl
Lists torrents with the status of Downloading or in the queue to download. -
seeding
orsd
Lists torrents with the status of Seeding or in the queue to seed. -
paused
orpa
Lists Paused torrents. -
checking
orch
Lists torrents with the status of Verifying or in the queue to verify. -
active
orac
Lists torrents that are actively uploading or downloading. -
errors
orer
Lists torrents with with errors along with the error message. -
sort
orso
Manipulate the sorting of the aforementioned commands, Call it without arguments for more. -
trackers
ortr
Lists all the trackers along with the number of torrents. -
add
orad
Takes one or many URLs or magnets to add them, You can send a .torrent file via Telegram to add it. -
search
orse
Takes a query and lists torrents with matching names. -
latest
orla
Lists the newest n torrents, n defaults to 5 if no argument is provided. -
info
orin
Takes one or more torrent's IDs to list more info about them. -
stop
orsp
Takes one or more torrent's IDs to stop them. or all to stop all torrents. -
start
orst
Takes one or more torrent's IDs to start them. or all to start all torrents. -
check
orck
Takes one or more torrent's IDs to verify them. or all to verify all torrents. -
del
Takes one or more torrent's IDs to delete them. -
deldata
Takes one or more torrent's IDs to delete them and their data. -
stats
orsa
Shows Transmission's stats. -
speed
orss
Shows the upload and download speeds. -
count
orco
Shows the torrents counts per status. -
help
Shows this a help message. -
version
Shows version numbers.
To get a notification upon a torrent completion all you have to do is run your transmission-daemon
with the --logfile
flag to have a log file, and run transmission-telegram
with the -transmission-logfile
flag and point that to the transmission log file, upon the completion of any torrent it should send you a message.