fix(suggestions): fixed using bot instead of Red
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
parent
4c3c030112
commit
5aa938acb8
1 changed files with 3 additions and 4 deletions
|
@ -2,9 +2,8 @@ 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
|
|
||||||
|
|
||||||
|
|
||||||
class Suggestions(commands.Cog):
|
class Suggestions(commands.Cog):
|
||||||
|
@ -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 = bot.get_cog('Suggestions')
|
cog = Red.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:
|
||||||
|
@ -633,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 = bot.get_cog('Suggestions')
|
cog = Red.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