diff --git a/nomen/settings.py b/nomen/settings.py index 2ae8b85..d43fde6 100644 --- a/nomen/settings.py +++ b/nomen/settings.py @@ -150,6 +150,8 @@ 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 """ + await self.bot.db.execute("INSERT OR IGNORE INTO users (user_id) VALUES(?)", (ctx.author.id,)) + if await ctx.bot.get_setting(ctx.author.id, "disabled"): await ctx.send("You are already opted-out") return @@ -160,7 +162,6 @@ You may want to `{ctx.clean_prefix}nomen export` first""" f"You have now opted-out and will no longer trigger or receive notifications. To opt back in, run `{ctx.clean_prefix}nomen opt-in`" ) - await self.bot.db.execute("INSERT OR IGNORE INTO users (user_id) VALUES(?)", (ctx.author.id,)) await self.bot.db.execute("UPDATE users SET disabled=1 WHERE user_id=?", (ctx.author.id,)) await self.bot.db.commit() @@ -170,6 +171,8 @@ You may want to `{ctx.clean_prefix}nomen export` first""" Opt-in to Nomen processing your messages """ + await self.bot.db.execute("INSERT OR IGNORE INTO users (user_id) VALUES(?)", (ctx.author.id,)) + if not await ctx.bot.get_setting(ctx.author.id, "disabled"): await ctx.send("You are already opted-in") return @@ -180,7 +183,6 @@ You may want to `{ctx.clean_prefix}nomen export` first""" f"You have opted back in and will now trigger and receive notifications. To opt out, run `{ctx.clean_prefix}nomen opt-out`" ) - await self.bot.db.execute("INSERT OR IGNORE INTO users (user_id) VALUES(?)", (ctx.author.id,)) await self.bot.db.execute("UPDATE users SET disabled=0 WHERE user_id=?", (ctx.author.id,)) await self.bot.db.commit()