how to create command with parameter #1771
Replies: 1 comment 1 reply
-
bot.command('add', ctx => {
const [cmd, param] = (ctx.message.reply_to_message || ctx.message).text.split(' ')
console.log(cmd, param)
if (!param) return ctx.reply('Missing param');
doSomething()
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ngdream
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi
how to create create command with parameter like this : /add nam)
Beta Was this translation helpful? Give feedback.
All reactions