MMM-TelegramBot icon indicating copy to clipboard operation
MMM-TelegramBot copied to clipboard

custom command - shell command

Open chen32g opened this issue 4 years ago • 4 comments

Hello,

Can I add a custom command that run shell command?

Thank you.

chen32g avatar Jan 09 '21 15:01 chen32g

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

What do you want to do exactly?

bugsounet avatar Jan 09 '21 19:01 bugsounet

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 avatar Jan 10 '21 06:01 chen32g

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

chen32g avatar Jan 16 '21 11:01 chen32g

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)

bugsounet avatar Jan 16 '21 11:01 bugsounet