diff options
author | 2020-06-20 14:02:48 +0200 | |
---|---|---|
committer | 2020-06-20 14:02:48 +0200 | |
commit | a8b4e394d9da57287cd9497cd9bb0a97fa467e84 (patch) | |
tree | b463cd6f7b4cb97e5b50d83f9aebc1897b5aba5f | |
parent | Merge branch 'origin/master' into kwzrd/incidents (diff) |
Incidents: de-clyde archive webhook username
With PR #1009 merged, we now apply the same fix to our relay function.
This prevents the "clyde" word from sneaking into the webhook username,
which is forbidden and will return a 400.
-rw-r--r-- | bot/cogs/moderation/incidents.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/cogs/moderation/incidents.py b/bot/cogs/moderation/incidents.py index 41a98bcb7..040f2c0c8 100644 --- a/bot/cogs/moderation/incidents.py +++ b/bot/cogs/moderation/incidents.py @@ -8,6 +8,7 @@ from discord.ext.commands import Cog from bot.bot import Bot from bot.constants import Channels, Emojis, Roles, Webhooks +from bot.utils.messages import sub_clyde log = logging.getLogger(__name__) @@ -169,7 +170,7 @@ class Incidents(Cog): # Now relay the incident message: discord.Message = await webhook.send( content=incident.clean_content, # Clean content will prevent mentions from pinging - username=incident.author.name, + username=sub_clyde(incident.author.name), avatar_url=incident.author.avatar_url, wait=True, # This makes the method return the sent Message object ) |