Should the Televerse.filter
method be generic method?
#71
HeySreelal
started this conversation in
Polls
Replies: 1 comment 1 reply
-
Yes this could probably be a nice thing to add |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! Just have a question about a weird idea.
If you have already tried you might already know the
Televerse.filter
method is highly effective for filtering out and listening to highly specific message updates. But as I've already said, this method only listens toMessage
updates.That is the context passed to the callback and the predicate is actually of type MessageContext, that is, you cannot listen to an inline query update or a callback query update with the filter method.
What I'm thinking is an approach, something like the following code, by which you can match any update by passing the generic type to the filter method.
1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions