This will be a Telegram bot who controls an aria2 daemon using diana. Using the bot one can add new downloads, start, stop, or remove them, check their status and manage downloads by sending commands to the bot. I created this bot to control my downloads on a Raspberry Pi from any where.
To install and run the bot make sure Python, virtualenv and aria2 are installed
and the git sub-module is initialized and updated. Create a Telegram bot (using @BotFather in Telegram). Put your
bot’s token in the run.sh
file and run it. This will create a virtual env, activate it and start the aria2, diana and the bot.
./run.sh
Commands starting with /diana
are sent to aria2. You can send /diana help
to see all available commands. Also see Diana docs for all available commands.
This bot uses diana to interact with aria2. Diana will launch the aria2 daemon itself, so there is no need to start aria2 and configure it. Make sure the default port for aria2 RPC is open.
If you want the bot to start on boot you use the service file. The service file is diana.service
. Edit
the file and correct the path accordingly and copy it to /etc/systemd/system
. Enable the service
by the command below.
systemctl enable diana.service