From 6b278f47487fed131514ed1fdcc4df1dc6295ffa Mon Sep 17 00:00:00 2001 From: Zalk0 <88582103+zalk0@users.noreply.github.com> Date: Wed, 13 Mar 2024 21:52:51 +0100 Subject: [PATCH 1/2] fix: team member check --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 0b05992..7905405 100644 --- a/bot.py +++ b/bot.py @@ -112,7 +112,7 @@ async def on_message(self, message: discord.Message): async def is_team_member_or_owner(self, author: discord.User) -> bool: if self.application.team: - return author.id in self.application.team.members + return author.id in [member.id for member in self.application.team.members] else: return author.id == self.application.owner.id From b614a6fe8adcc2a3cbfd26c25e9728646bf7d318 Mon Sep 17 00:00:00 2001 From: Zalk0 <88582103+zalk0@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:47:56 +0100 Subject: [PATCH 2/2] fix: delete until here command is now visible only to people who can use it --- commands/misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/misc.py b/commands/misc.py index 7b428ce..309c319 100644 --- a/commands/misc.py +++ b/commands/misc.py @@ -61,6 +61,7 @@ async def pin(interaction: discord.Interaction[ChouetteBot], message: discord.Me # Make a context menu command to delete messages @app_commands.guild_only +@app_commands.default_permissions(manage_messages=True) @app_commands.checks.bot_has_permissions( manage_messages=True, read_message_history=True, read_messages=True )