diff options
Diffstat (limited to 'bot')
-rw-r--r-- | bot/exts/utilities/bookmark.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/exts/utilities/bookmark.py b/bot/exts/utilities/bookmark.py index 473ecedc..e2988dca 100644 --- a/bot/exts/utilities/bookmark.py +++ b/bot/exts/utilities/bookmark.py @@ -180,6 +180,11 @@ class Bookmark(commands.Cog): async def _bookmark_context_menu_callback(self, interaction: discord.Interaction, message: discord.Message) -> None: """The callback that will be invoked upon using the bookmark's context menu command.""" permissions = interaction.channel.permissions_for(interaction.user) + if not interaction.channel.guild: + embed = Bookmark.build_error_embed("This command cannot be used in DMs.") + await interaction.response.send_message(embed=embed) + return + if not permissions.read_messages: log.info(f"{interaction.user} tried to bookmark a message in #{interaction.channel}" f"but has no permissions.") |