How to run Command using TPY Code?

To run command you need to use Bot.runCommand() function

Example

Using this code for running a command from a command

Make command as /command
options = "my options" # you can use json here
bot.replyText(message.chat.id, "running next command")
Bot.runCommand("/nextCommand", options)
Again make new command as /nextCommand
bot.replyText(message.chat.id, "Success")