diff options
author | 2019-12-12 20:45:05 -0800 | |
---|---|---|
committer | 2019-12-12 20:45:05 -0800 | |
commit | adffc6879f4304421b2227cd4e8a76d68fabba3c (patch) | |
tree | 67c0ba0155bf1c197956ab2a8fe5f4c2468744a5 | |
parent | Merge pull request #692 from python-discord/enh/verification/688/allow-mods-cmds (diff) | |
parent | Merge branch 'master' into enh/mod/534/no-ping-dm-fail (diff) |
Merge pull request #694 from python-discord/enh/mod/534/no-ping-dm-fail
Moderation: show emoji for DM failure instead of mentioning actor
-rw-r--r-- | bot/cogs/moderation/scheduler.py | 5 | ||||
-rw-r--r-- | bot/constants.py | 2 | ||||
-rw-r--r-- | config-default.yml | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/bot/cogs/moderation/scheduler.py b/bot/cogs/moderation/scheduler.py index 2dd0bf40e..01e4b1fe7 100644 --- a/bot/cogs/moderation/scheduler.py +++ b/bot/cogs/moderation/scheduler.py @@ -114,8 +114,8 @@ class InfractionScheduler(Scheduler): dm_result = ":incoming_envelope: " dm_log_text = "\nDM: Sent" else: + dm_result = f"{constants.Emojis.failmail} " dm_log_text = "\nDM: **Failed**" - log_content = ctx.author.mention if infraction["actor"] == self.bot.user.id: log.trace( @@ -255,8 +255,7 @@ class InfractionScheduler(Scheduler): if log_text.get("DM") == "Sent": dm_emoji = ":incoming_envelope: " elif "DM" in log_text: - # Mention the actor because the DM failed to send. - log_content = ctx.author.mention + dm_emoji = f"{constants.Emojis.failmail} " # Accordingly display whether the pardon failed. if "Failure" in log_text: diff --git a/bot/constants.py b/bot/constants.py index 89504a2e0..3b1ca2887 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -256,6 +256,8 @@ class Emojis(metaclass=YAMLGetter): status_idle: str status_dnd: str + failmail: str + bullet: str new: str pencil: str diff --git a/config-default.yml b/config-default.yml index 930a1a0e6..9e6ada3dd 100644 --- a/config-default.yml +++ b/config-default.yml @@ -27,6 +27,8 @@ style: status_dnd: "<:status_dnd:470326272082313216>" status_offline: "<:status_offline:470326266537705472>" + failmail: "<:failmail:633660039931887616>" + bullet: "\u2022" pencil: "\u270F" new: "\U0001F195" |