fix(suggestions): fixed using bot instead of Red
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Seaswimmer 2023-09-21 12:30:39 -04:00
parent 4c3c030112
commit 5aa938acb8
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -2,9 +2,8 @@ import datetime
import re
import typing
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.utils.chat_formatting import humanize_list
class Suggestions(commands.Cog):
@ -612,7 +611,7 @@ class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
)
async def on_submit(self, interaction: discord.Interaction):
cog = bot.get_cog('Suggestions')
cog = Red.get_cog('Suggestions')
if self.reason.value != "":
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, self.reason.value)
else:
@ -633,7 +632,7 @@ class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
)
async def on_submit(self, interaction: discord.Interaction):
cog = bot.get_cog('Suggestions')
cog = Red.get_cog('Suggestions')
if self.reason.value != "":
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, self.reason.value)
else: