aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-06-09 23:03:51 +0200
committerGravatar GitHub <[email protected]>2019-06-09 23:03:51 +0200
commitabe4cb900438327c8ef901acc07ac777e81470bb (patch)
tree847cc43302d76768f1d0924383582910baf27df7
parentUpdates the cog list and cog batch load/unloads to use status_indicator emoji... (diff)
parentFix linting error for snakes (diff)
Merge pull request #371 from python-discord/django-appeals
Django: Add Appeals E-mail to Infraction DMs
-rw-r--r--bot/cogs/moderation.py4
-rw-r--r--bot/cogs/snakes.py2
-rw-r--r--bot/utils/snakes/sal.py2
3 files changed, 6 insertions, 2 deletions
diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py
index 9db5d9d62..256d38866 100644
--- a/bot/cogs/moderation.py
+++ b/bot/cogs/moderation.py
@@ -30,6 +30,7 @@ INFRACTION_ICONS = {
"Ban": Icons.user_ban
}
RULES_URL = "https://pythondiscord.com/about/rules"
+APPEALABLE_INFRACTIONS = ("Ban", "Mute")
def proxy_user(user_id: str) -> Object:
@@ -1173,6 +1174,9 @@ class Moderation(Scheduler):
embed.title = f"Please review our rules over at {RULES_URL}"
embed.url = RULES_URL
+ if infr_type in APPEALABLE_INFRACTIONS:
+ embed.set_footer(text="To appeal this infraction, send an e-mail to [email protected]")
+
return await self.send_private_embed(user, embed)
async def notify_pardon(
diff --git a/bot/cogs/snakes.py b/bot/cogs/snakes.py
index d74380259..8dee13dca 100644
--- a/bot/cogs/snakes.py
+++ b/bot/cogs/snakes.py
@@ -13,9 +13,9 @@ from typing import Any, Dict
import aiohttp
import async_timeout
+from PIL import Image, ImageDraw, ImageFont
from discord import Colour, Embed, File, Member, Message, Reaction
from discord.ext.commands import BadArgument, Bot, Context, bot_has_permissions, group
-from PIL import Image, ImageDraw, ImageFont
from bot.constants import ERROR_REPLIES, Keys, URLs
from bot.converters import Snake
diff --git a/bot/utils/snakes/sal.py b/bot/utils/snakes/sal.py
index 8530d8a0f..2528664aa 100644
--- a/bot/utils/snakes/sal.py
+++ b/bot/utils/snakes/sal.py
@@ -6,9 +6,9 @@ import os
import random
import aiohttp
+from PIL import Image
from discord import File, Member, Reaction
from discord.ext.commands import Context
-from PIL import Image
from bot.utils.snakes.sal_board import (
BOARD, BOARD_MARGIN, BOARD_PLAYER_SIZE,