prevent repeatedly opting out and in

This commit is contained in:
Infinidoge 2025-01-01 01:19:00 -05:00
parent cb227109f4
commit 4a27156cd0
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA

View file

@ -148,6 +148,10 @@ You may want to `{ctx.clean_prefix}nomen export` first"""
You will not trigger anyone else's notifications, and you will not receive any notifications You will not trigger anyone else's notifications, and you will not receive any notifications
""" """
if await ctx.bot.get_setting(ctx.author.id, "disabled"):
await ctx.send("You are already opted-out")
return
log.debug(f"Opting-out: {ctx.author} ({ctx.author.id})") log.debug(f"Opting-out: {ctx.author} ({ctx.author.id})")
await ctx.send( await ctx.send(
@ -163,6 +167,10 @@ You may want to `{ctx.clean_prefix}nomen export` first"""
Opt-in to Nomen processing your messages Opt-in to Nomen processing your messages
""" """
if not await ctx.bot.get_setting(ctx.author.id, "disabled"):
await ctx.send("You are already opted-in")
return
log.debug(f"Opting-in: {ctx.author} ({ctx.author.id})") log.debug(f"Opting-in: {ctx.author} ({ctx.author.id})")
await ctx.send( await ctx.send(