misc(forums): changed owner_id to owner.id

This commit is contained in:
Seaswimmer 2023-09-07 19:20:07 -04:00
parent cf013e81b4
commit 529fdfa341
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -27,7 +27,7 @@ class Forums(commands.Cog):
}
if match and reason:
passed_info.update({"reason": reason})
if match or ctx.author.id == ctx.channel.owner_id:
if match or ctx.author.id == ctx.channel.owner.id:
msg = await ctx.send("Are you sure you'd like to mark this thread as resolved?")
passed_info.update({"msg": msg})
await msg.edit(view=self.ResolvedButtons(timeout=180, passed_info=passed_info))
@ -47,7 +47,7 @@ class Forums(commands.Cog):
@ui.button(label="Yes", style=discord.ButtonStyle.success, emoji="")
async def resolved_button_yes(self, button: ui.Button, interaction: discord.Interaction):
match = any(role_id in interaction.user.roles for role_id in await self.config.guild(interaction.guild).request_roles())
if match or interaction.user.id == interaction.channel.owner_id:
if match or interaction.user.id == interaction.channel.owner.id:
channel = self.ctx.channel
await interaction.response.defer()
if self.reason:
@ -65,7 +65,7 @@ class Forums(commands.Cog):
@ui.button(label="No", style=discord.ButtonStyle.danger, emoji="")
async def resolved_button_no(self, button: ui.Button, interaction: discord.Interaction):
match = any(role_id in interaction.user.roles for role_id in await self.config.guild(interaction.guild).request_roles())
if match or interaction.user.id == interaction.channel.owner_id:
if match or interaction.user.id == interaction.channel.owner.id:
await interaction.response.defer()
await self.msg.delete()
await self.ctx.message.delete()