Skip to content

Trigger a command by clicking on button #1462

Answered by jsstrn
Raduc4 asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I know, you cannot do that. Instead, have them both call the same handler:

const handleMyCommand = (ctx) => {...}

bot.command('my-command', handleMyCommand)

bot.action('my-action', handleMyCommand)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@winqdev
Comment options

@Raduc4
Comment options

Answer selected by Raduc4
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants