diff --git a/babel/confessionbot_en.ini b/babel/confessionbot_en.ini index 51df4ed..5941ede 100755 --- a/babel/confessionbot_en.ini +++ b/babel/confessionbot_en.ini @@ -46,6 +46,7 @@ command_block_help = {p:{cmd}} (anon-id) [unblock] command_shuffle_help = {p:{cmd}} Resets all anon-ids to reduce the chances of one user being tracked and identified. ; controlpanel labels +dm_notifications = DM Notifications guild_banlist = Banned Anon-IDs image_support = Images in confessions enable_webhooks = Anon-ID Name & PFP diff --git a/extensions/confessions_moderation.py b/extensions/confessions_moderation.py index b194a4f..b2eb581 100644 --- a/extensions/confessions_moderation.py +++ b/extensions/confessions_moderation.py @@ -265,7 +265,7 @@ async def on_confession_review(self, inter:disnake.MessageInteraction): ) if isinstance(pendingconfession.origin, disnake.Message): await pendingconfession.origin.reply(content) - else: + elif f'{pendingconfession.author_id}_dm_notif' not in self.config: try: await pendingconfession.author.send(content) except disnake.Forbidden: diff --git a/extensions/confessions_setup.py b/extensions/confessions_setup.py index b94c6c0..3324561 100644 --- a/extensions/confessions_setup.py +++ b/extensions/confessions_setup.py @@ -50,9 +50,9 @@ def __init__(self, bot:MerelyBot): def controlpanel_settings(self, inter:disnake.Interaction): # ControlPanel integration + out = [Toggleable(self.SCOPE, f'{inter.user.id}_dm_notif', 'dm_notifications', default=True)] if inter.guild is None: - return [] - out = [] + return out if inter.permissions.administrator: out += [ Toggleable(self.SCOPE, f'{inter.guild_id}_imagesupport', 'image_support', default=True),