fix deal with invalid url

This commit is contained in:
2024-06-24 02:17:26 +08:00
parent 23128af96a
commit e7ccd70e56
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -41,6 +41,8 @@ async def inline_query(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No
return
logger.info(f"Query: {query}")
async with Telegram(query) as tweet:
if not tweet:
return
await update.inline_query.answer(tweet.inline_query_result())