diff --git a/nomen/settings.py b/nomen/settings.py index dca39af..6e4f2c2 100644 --- a/nomen/settings.py +++ b/nomen/settings.py @@ -37,14 +37,8 @@ You may want to `{ctx.clean_prefix}nomen export` first""" to_purge = await confirm(ctx, msg) if to_purge: - await self.bot.db.execute( - """ - DELETE FROM keywords WHERE user_id=?; - DELETE FROM users WHERE user_id=?; - DELETE FROM user_ignores WHERE user_id=?; - """, - (ctx.author.id,), - ) + # Foreign key constraints will automatically cascade to delete dependent data + await self.bot.db.execute("DELETE FROM users WHERE user_id=?", (ctx.author.id,)) await self.bot.db.commit() await ctx.send("Deleted all user data.") else: