above line?
Provide more context. Where did you get that from? What are you trying to do? What library are you using?
i am using pyrogram j just need to know how would someone translate a pattern like this by using the gettext
use it inside the function
the filter trigers before that
the filter trigger when the pattern match
if you think about a situation like this home_btn = ReplyMarkup(_('home')) @Client.on_message(filters.regex(r'^home$')) then you will come to the same question
I think you gotta define a function under that @client.something as it is a decorator
you could get ban if @group tags a group beware
Btw, you should provide a better exsmple, maybe a link to the official docs or something
https://docs.pyrogram.org/topics/use-filters
he actually need to first translate a message and use regex on the translated message to confirm if it match a pattern, thats what he was trying to say
There's nothing there about a gettext function
the gettext is a separate module which i want to use with pyrogram
You mean, translate the word inside the regex to other languages?
Обсуждают сегодня