diff --git a/nomen/notifications.py b/nomen/notifications.py index de3cfc2..4057ba7 100644 --- a/nomen/notifications.py +++ b/nomen/notifications.py @@ -287,6 +287,18 @@ class Notifications(Cog): elif not to_clear: return await ctx.send("Canceled", delete_after=10) + if any(c in keyword for c in ["“", "”", "‘", "’"]): + to_clear = await confirm( + ctx, + "Are you sure you want to add a keyword containing smart punctuation (aka fancy quotes)? (Reply with yes/no)\n**Note:** Smart punctuation **will frequently prevent keywords from working**.\nIf you are on an Apple device, go to your keyboard settings and disable 'Smart Punctuation'.", + True, + ) + + if to_clear is None: + return await ctx.send("Timed out or received an invalid response", delete_after=10) + elif not to_clear: + return await ctx.send("Canceled", delete_after=10) + await self.add_keyword(ctx.guild.id, ctx.author.id, keyword, False) except KeywordError as e: await e.send(ctx)