diff --git a/gpt3discord.py b/gpt3discord.py index 55d53d81..623c4dc8 100644 --- a/gpt3discord.py +++ b/gpt3discord.py @@ -31,7 +31,7 @@ from models.openai_model import Model -__version__ = "10.2.5" +__version__ = "10.2.6" PID_FILE = Path("bot.pid") diff --git a/services/image_service.py b/services/image_service.py index 66effb88..1c517a6e 100644 --- a/services/image_service.py +++ b/services/image_service.py @@ -1,4 +1,5 @@ import asyncio +import random import tempfile import traceback from io import BytesIO @@ -262,7 +263,7 @@ async def on_timeout(self): class VaryButton(discord.ui.Button): def __init__(self, number, image_url, cog, converser_cog, custom_api_key): - super().__init__(style=discord.ButtonStyle.blurple, label="Vary " + str(number), custom_id="vary_button") + super().__init__(style=discord.ButtonStyle.blurple, label="Vary " + str(number), custom_id="vary_button"+str(random.randint(10000000,99999999))) self.number = number self.image_url = image_url self.cog = cog @@ -318,7 +319,7 @@ async def callback(self, interaction: discord.Interaction): class SaveButton(discord.ui.Button["SaveView"]): def __init__(self, number: int, image_url: str): - super().__init__(style=discord.ButtonStyle.gray, label="Save " + str(number), custom_id="save_button") + super().__init__(style=discord.ButtonStyle.gray, label="Save " + str(number), custom_id="save_button"+str(random.randint(1000000,9999999))) self.number = number self.image_url = image_url