Page 1 of 1

dtgbot new function"download"

Posted: Monday 21 March 2016 11:27
by pietrondo
Hi, I'm new on dtgbot.. I would add new function to the bot.
I need to download "thing" (curl or wget) using the bot integrated with domoticz.
I think I need to add a new "module" in lua folder.
The problem now is to create a "new function" that tells:
download a link in a specific folder of raspberry (where domoticz is installed).
Someone could help me?

thanks!

Re: dtgbot new function"download"

Posted: Monday 21 March 2016 22:52
by simonrg
Best way would be to write a new module, as potentially that could give you a lot of flexibility.

But a quicker way would be to use a Bash script and address the bot directly - have a look at https://github.com/steps39/dtgbot/blob/ ... oorbell.sh, which sends a photo and then have a look at the Telegram bot documentation - https://telegram.org/blog/bot-revolution.