fix(suggestions): reverted previous fix as that wasn't the issue
This commit is contained in:
parent
dd33315e16
commit
b943ba276f
1 changed files with 4 additions and 6 deletions
|
@ -598,9 +598,8 @@ class Suggestions(commands.Cog):
|
||||||
)
|
)
|
||||||
|
|
||||||
class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
|
class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
|
||||||
def __init__(self, old_interaction, message):
|
def __init__(self, message):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.old_interaction: discord.Interaction = old_interaction
|
|
||||||
self.message: discord.Message = message
|
self.message: discord.Message = message
|
||||||
|
|
||||||
reason = discord.ui.TextInput(
|
reason = discord.ui.TextInput(
|
||||||
|
@ -612,7 +611,7 @@ class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
|
||||||
)
|
)
|
||||||
|
|
||||||
async def on_submit(self, interaction: discord.Interaction):
|
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 != "":
|
if self.reason.value != "":
|
||||||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, self.reason.value)
|
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, self.reason.value)
|
||||||
else:
|
else:
|
||||||
|
@ -620,9 +619,8 @@ class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
|
||||||
await interaction.response.send_message(content="Suggestion approved!", ephemeral=True)
|
await interaction.response.send_message(content="Suggestion approved!", ephemeral=True)
|
||||||
|
|
||||||
class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
|
class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
|
||||||
def __init__(self, old_interaction, message):
|
def __init__(self, message):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.old_interaction: discord.Interaction = old_interaction
|
|
||||||
self.message: discord.Message = message
|
self.message: discord.Message = message
|
||||||
|
|
||||||
reason = discord.ui.TextInput(
|
reason = discord.ui.TextInput(
|
||||||
|
@ -634,7 +632,7 @@ class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
|
||||||
)
|
)
|
||||||
|
|
||||||
async def on_submit(self, interaction: discord.Interaction):
|
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 != "":
|
if self.reason.value != "":
|
||||||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, self.reason.value)
|
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, self.reason.value)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue