Closed guerman5 closed 2 years ago
I tested on web and ios client, oa;ping google.com
is works ok.
Thanks for your time. I also used ios client to send the command (screenshots above), as well as windows client. Notice that my TGshellbot is running in Termux. what about your environment?
Im trying to find the logs, but all I can get is the feed when running bot.py (screenshot below)
Each entry you see above, only happens when I send a command without the oa;
(successful btw)
bot.py:163: TelegramDeprecationWarning: The @run_async decorator is deprecated. Use the `run_async` parameter of your Handler or `Dispatcher.run_async` instead.
__do_exec(cmd, update, context)
If I throw an oa;command
nothing happens
You can add some debug code to see what happend. ex:
@restricted
def do_exec(update, context):
print('enter do_exec with message: ', update.message)
if not update.message:
return
if __do_cd(update, context):
print('do cd and return')
return
cmd: str = update.message.text
if not __check_cmd(cmd):
print('cmd is not allowed:', cmd)
return
print('__do_exec')
__do_exec(cmd, update, context)
I added the print lines , after running the different command syntaxes , no extra output on the chat window nor live log entries. Dont know what I'm doing wrong, I might be confused what I should expect to happen.
Later, I update the code, cloned the recent changed files. Same result, same issue on my side Then I fresh installed in another environment (Archlinux), runs exactly as it does in Termux.
The only settings i modify are the API_TOKEN, USERS and CMD_WHITE
TOKEN = os.environ.get("TELEGRAM_API_TOKEN", '123:sfdDKF_FKDjdf45')
ENABLED_USERS = os.environ.get("ENABLED_USERS", '11111')
CMD_WHITE_LIST = {'date', 'ping', 'ls'}
So, if is not the environment and the settings are ok, why is not working :S
Hi dear @vicalloy and friends, thanks for the great tool
I've implemented TG-shell-bot in an old android6 with termux, its running awesome with pm2
The issue: following the instruction how to use
oa;
in the caseoa;command
"add oa in command to send all output. E.g.:"oa;ping google.com
/script oa;demo.py
only
/script oa;script
is workingI tried to change the CMD_BLACK_CHARS in settings file, thinking that
';'
might be the culprit, but results were the sameHope its just a typo somewhere, easy fix.
Happy new year! Cheers Guer