Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Feb 10, 2023
2 parents ed43295 + 63b5f17 commit cf538db
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
12 changes: 10 additions & 2 deletions cogs/prompt_optimizer_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ class DrawButton(discord.ui.Button["OptimizeView"]):
def __init__(
self, converser_cog, image_service_cog, deletion_queue, custom_api_key
):
super().__init__(style=discord.ButtonStyle.green, label="Draw", custom_id="draw_button_optimizer")
super().__init__(
style=discord.ButtonStyle.green,
label="Draw",
custom_id="draw_button_optimizer",
)
self.converser_cog = converser_cog
self.image_service_cog = image_service_cog
self.deletion_queue = deletion_queue
Expand Down Expand Up @@ -237,7 +241,11 @@ class RedoButton(discord.ui.Button["OptimizeView"]):
def __init__(
self, converser_cog, image_service_cog, deletion_queue, custom_api_key=None
):
super().__init__(style=discord.ButtonStyle.danger, label="Retry", custom_id="redo_button_optimizer")
super().__init__(
style=discord.ButtonStyle.danger,
label="Retry",
custom_id="redo_button_optimizer",
)
self.converser_cog = converser_cog
self.image_service_cog = image_service_cog
self.deletion_queue = deletion_queue
Expand Down
6 changes: 5 additions & 1 deletion services/image_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,11 @@ async def callback(self, interaction: discord.Interaction):

class RedoButton(discord.ui.Button["SaveView"]):
def __init__(self, cog, converser_cog, custom_api_key):
super().__init__(style=discord.ButtonStyle.danger, label="Retry", custom_id="redo_button_draw_main")
super().__init__(
style=discord.ButtonStyle.danger,
label="Retry",
custom_id="redo_button_draw_main",
)
self.cog = cog
self.converser_cog = converser_cog
self.custom_api_key = custom_api_key
Expand Down
20 changes: 16 additions & 4 deletions services/moderations_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ def __init__(

class ApproveMessageButton(discord.ui.Button["ModerationAdminView"]):
def __init__(self, message, moderation_message, current_num):
super().__init__(style=discord.ButtonStyle.green, label="Approve", custom_id="approve_button")
super().__init__(
style=discord.ButtonStyle.green, label="Approve", custom_id="approve_button"
)
self.message = message
self.moderation_message = moderation_message
self.current_num = current_num
Expand All @@ -336,7 +338,11 @@ async def callback(self, interaction: discord.Interaction):

class DeleteMessageButton(discord.ui.Button["ModerationAdminView"]):
def __init__(self, message, moderation_message, current_num):
super().__init__(style=discord.ButtonStyle.danger, label="Delete Message", custom_id="delete_button")
super().__init__(
style=discord.ButtonStyle.danger,
label="Delete Message",
custom_id="delete_button",
)
self.message = message
self.moderation_message = moderation_message
self.current_num = current_num
Expand All @@ -361,7 +367,9 @@ async def callback(self, interaction: discord.Interaction):

class KickUserButton(discord.ui.Button["ModerationAdminView"]):
def __init__(self, message, moderation_message, current_num):
super().__init__(style=discord.ButtonStyle.danger, label="Kick User", custom_id="kick_button")
super().__init__(
style=discord.ButtonStyle.danger, label="Kick User", custom_id="kick_button"
)
self.message = message
self.moderation_message = moderation_message
self.current_num = current_num
Expand Down Expand Up @@ -400,7 +408,11 @@ class TimeoutUserButton(discord.ui.Button["ModerationAdminView"]):
def __init__(
self, message, moderation_message, current_num, hours, nodelete, source_deleted
):
super().__init__(style=discord.ButtonStyle.danger, label=f"Timeout {hours}h", custom_id="timeout_button")
super().__init__(
style=discord.ButtonStyle.danger,
label=f"Timeout {hours}h",
custom_id="timeout_button",
)
self.message = message
self.moderation_message = moderation_message
self.hours = hours
Expand Down

0 comments on commit cf538db

Please sign in to comment.