Compare commits
No commits in common. "4c3c0301125e6835d9408a30d5b0f792c8466383" and "55867ea12a5e1677d7931763ca5b8b9596dd2944" have entirely different histories.
4c3c030112
...
55867ea12a
2 changed files with 7 additions and 7 deletions
|
@ -3,6 +3,8 @@ from .suggestions import Suggestions, approve_context, deny_context
|
||||||
|
|
||||||
async def setup(bot):
|
async def setup(bot):
|
||||||
await bot.add_cog(Suggestions(bot))
|
await bot.add_cog(Suggestions(bot))
|
||||||
|
|
||||||
|
async def setup(bot):
|
||||||
bot.tree.add_command(approve_context)
|
bot.tree.add_command(approve_context)
|
||||||
bot.tree.add_command(deny_context)
|
bot.tree.add_command(deny_context)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import datetime
|
||||||
import re
|
import re
|
||||||
import typing
|
import typing
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import app_commands, Config, checks, commands, bot
|
from redbot.core import app_commands, Config, checks, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core.utils.chat_formatting import humanize_list
|
from redbot.core.utils.chat_formatting import humanize_list
|
||||||
|
|
||||||
|
@ -612,11 +612,10 @@ 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 = bot.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(interaction, self.message, True, self.reason.value)
|
||||||
else:
|
else:
|
||||||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, None)
|
await Suggestions._interaction_finish_suggestion(interaction, self.message, True, None)
|
||||||
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..."):
|
||||||
|
@ -633,11 +632,10 @@ 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 = bot.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(interaction, self.message, False, self.reason.value)
|
||||||
else:
|
else:
|
||||||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, None)
|
await Suggestions._interaction_finish_suggestion(interaction, self.message, False, None)
|
||||||
await interaction.response.send_message(content="Suggestion denied!", ephemeral=True)
|
await interaction.response.send_message(content="Suggestion denied!", ephemeral=True)
|
||||||
|
|
||||||
@app_commands.context_menu(name="Approve Suggestion")
|
@app_commands.context_menu(name="Approve Suggestion")
|
||||||
|
|
Loading…
Reference in a new issue