MMRIZE / MMM-TelegramBot

TelegramBot module for remote-controlling MagicMirror
MIT License
26 stars 8 forks source link

custom command - shell command #69

Open chen32g opened 3 years ago

chen32g commented 3 years ago

Hello,

Can I add a custom command that run shell command?

Thank you.

bugsounet commented 3 years ago

It.'s not the telegrambot rules but why not.

What do you want to do exactly?

chen32g commented 3 years ago

Refresh Magic Mirror web for example, it's long command because it's run the keystroke ctrl+r xdotool windowactivate --sync $(xdotool search --class electron | awk 'FNR == 3 {print}') key ctrl+r

Magic Mirror restart pm2 restart Magic Mirror

And many more.

Now I run them with /shell and same them on /favor but I prefer custom command with short description. Thanks.

chen32g commented 3 years ago

Hello, I just edit the following file and add new commands as shell (like the reboot command) and everything works great and it show as new command line in the list.

en.json MMM-TelegramBot.js node_helper.js

bugsounet commented 3 years ago

hi, make a pull request in the dev branch

I will see (sorry i'm occuped acctually, working around new module -> MMM-Alexa) (I have to many modules to manage !! so crazy things, ahahahah)