Skip to content

Commit

Permalink
Confession vetting DM notifications can now be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
yiays committed Jul 8, 2024
1 parent b0fb66b commit 452eeab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions babel/confessionbot_en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion extensions/confessions_moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions extensions/confessions_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 452eeab

Please sign in to comment.