Reputation: 55
**Hey guys I want to use parameters in my bot **
For example I send
/ping hello 5
ctx.reply(You want me to ping hello 5 times)
In the above code /ping is the command while hello and 5 are parameters so I can access them in my codes
In
bot.command('ping')
I don't think it works so I need help to work with parameters
Upvotes: 3
Views: 6146
Reputation: 111
You should parse ctx.update.message.text - it is the full command with other text. For example, ctx.update.message.text.split(' ')
returns array of arguments with a command in 0 place
Upvotes: 7