add xitter link fixer
This commit is contained in:
parent
5ea98cd3f7
commit
3be7c3807a
20
bot.py
20
bot.py
@ -27,6 +27,26 @@ async def inline_respond_with_sticker(update: Update, context: ContextTypes.DEFA
|
||||
if not query:
|
||||
return
|
||||
|
||||
xcom = "https://x.com"
|
||||
|
||||
if xcom in query:
|
||||
|
||||
results = [
|
||||
{
|
||||
"type": "article",
|
||||
"id": "1",
|
||||
"title": "fix xitter links",
|
||||
"description": query.replace(xcom, "https://fxtwitter.com"),
|
||||
"input_message_content": {
|
||||
"message_text": query.replace(xcom, "https://fxtwitter.com")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
await context.bot.answer_inline_query(update.inline_query.id, results)
|
||||
|
||||
return
|
||||
|
||||
bot_info = await context.bot.get_me()
|
||||
|
||||
file = render_text_on_image("red_ebalo.png", query)
|
||||
|
Loading…
Reference in New Issue
Block a user