fix(suggestions): reverted previous fix as that wasn't the issue

This commit is contained in:
Seaswimmer 2023-09-21 12:45:34 -04:00
parent dd33315e16
commit b943ba276f
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -598,9 +598,8 @@ class Suggestions(commands.Cog):
)
class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
def __init__(self, old_interaction, message):
def __init__(self, message):
super().__init__()
self.old_interaction: discord.Interaction = old_interaction
self.message: discord.Message = message
reason = discord.ui.TextInput(
@ -612,7 +611,7 @@ class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
)
async def on_submit(self, interaction: discord.Interaction):
cog = self.old_interaction.client.get_cog('Suggestions')
cog = interaction.client.get_cog('Suggestions')
if self.reason.value != "":
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, self.reason.value)
else:
@ -620,9 +619,8 @@ class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
await interaction.response.send_message(content="Suggestion approved!", ephemeral=True)
class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
def __init__(self, old_interaction, message):
def __init__(self, message):
super().__init__()
self.old_interaction: discord.Interaction = old_interaction
self.message: discord.Message = message
reason = discord.ui.TextInput(
@ -634,7 +632,7 @@ class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
)
async def on_submit(self, interaction: discord.Interaction):
cog = self.old_interaction.client.get_cog('Suggestions')
cog = interaction.client.get_cog('Suggestions')
if self.reason.value != "":
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, self.reason.value)
else: