From 8de8b1037c821e543451f4c4f8b2c51c94779756 Mon Sep 17 00:00:00 2001 From: ned Date: Tue, 4 Apr 2023 15:24:53 +0200 Subject: [PATCH] =?UTF-8?q?Use=20a=20unique=20id=20for=20inline=20queries?= =?UTF-8?q?=20(fix=C2=A0#181)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/telegram_bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/telegram_bot.py b/bot/telegram_bot.py index 02a2b63..604a6b5 100644 --- a/bot/telegram_bot.py +++ b/bot/telegram_bot.py @@ -5,6 +5,7 @@ import itertools import asyncio import telegram +from uuid import uuid4 from telegram import constants from telegram import Message, MessageEntity, Update, InlineQueryResultArticle, InputTextMessageContent, BotCommand, ChatMember from telegram.error import RetryAfter, TimedOut @@ -506,7 +507,7 @@ class ChatGPTTelegramBot: results = [ InlineQueryResultArticle( - id=query, + id=str(uuid4()), title='Ask ChatGPT', input_message_content=InputTextMessageContent(query), description=query,