Context shortcuts do not take take reply_to_message into account.
Replies are a bit of a gap in what grammY supports. This should be fixed. Here are some examples of what we'd like to do:
Which entities does the message that is being replied to have?
Does the message that is being replied to have a /start command?
Is the message that is being replied to an image?
Does the message that is being replied to have a caption that matches a regular expression?
Let's discuss a few ideas how to tackle this.
Take this pull request and apply it to everything else. This would mean that we have to introduce a lot of options everywhere.
Provide a namespace ctx.replyTo which lets us test for all sorts of things, such as ctx.replyTo.message for the message object, ctx.replyTo.hasCommand("start") to check for /start commands, ctx.replyTo.entities to cover this PQ here, and so on.
Provide a grammY plugin that does all of these things somehow.
Context shortcuts do not take take
reply_to_message
into account.Replies are a bit of a gap in what grammY supports. This should be fixed. Here are some examples of what we'd like to do:
/start
command?Let's discuss a few ideas how to tackle this.
ctx.replyTo
which lets us test for all sorts of things, such asctx.replyTo.message
for the message object,ctx.replyTo.hasCommand("start")
to check for/start
commands,ctx.replyTo.entities
to cover this PQ here, and so on.Originally posted by @KnorpelSenf in https://github.com/grammyjs/grammY/issues/413#issuecomment-1565913241