Skip to content

Commit

Permalink
fix buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Feb 10, 2023
1 parent 6983f81 commit ed43295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gpt3discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from models.openai_model import Model


__version__ = "10.2.5"
__version__ = "10.2.6"


PID_FILE = Path("bot.pid")
Expand Down
5 changes: 3 additions & 2 deletions services/image_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import random
import tempfile
import traceback
from io import BytesIO
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ed43295

Please sign in to comment.