misc(forums): changed owner_id to owner.id
This commit is contained in:
parent
cf013e81b4
commit
529fdfa341
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ class Forums(commands.Cog):
|
||||||
}
|
}
|
||||||
if match and reason:
|
if match and reason:
|
||||||
passed_info.update({"reason": 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?")
|
msg = await ctx.send("Are you sure you'd like to mark this thread as resolved?")
|
||||||
passed_info.update({"msg": msg})
|
passed_info.update({"msg": msg})
|
||||||
await msg.edit(view=self.ResolvedButtons(timeout=180, passed_info=passed_info))
|
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="✅")
|
@ui.button(label="Yes", style=discord.ButtonStyle.success, emoji="✅")
|
||||||
async def resolved_button_yes(self, button: ui.Button, interaction: discord.Interaction):
|
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())
|
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
|
channel = self.ctx.channel
|
||||||
await interaction.response.defer()
|
await interaction.response.defer()
|
||||||
if self.reason:
|
if self.reason:
|
||||||
|
@ -65,7 +65,7 @@ class Forums(commands.Cog):
|
||||||
@ui.button(label="No", style=discord.ButtonStyle.danger, emoji="❌")
|
@ui.button(label="No", style=discord.ButtonStyle.danger, emoji="❌")
|
||||||
async def resolved_button_no(self, button: ui.Button, interaction: discord.Interaction):
|
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())
|
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 interaction.response.defer()
|
||||||
await self.msg.delete()
|
await self.msg.delete()
|
||||||
await self.ctx.message.delete()
|
await self.ctx.message.delete()
|
||||||
|
|
Loading…
Reference in a new issue