From 522eb76d05a0088fc5efcd26bb13870cb3ed85b8 Mon Sep 17 00:00:00 2001 From: xenofem Date: Sat, 16 May 2020 12:34:21 -0400 Subject: [PATCH] ignore NSFW channels --- club-penguin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/club-penguin.py b/club-penguin.py index c7e6cab..8abda5d 100644 --- a/club-penguin.py +++ b/club-penguin.py @@ -49,6 +49,9 @@ async def on_message(message): if message.author == client.user: return + if message.channel.is_nsfw(): + return + if RUDE_WORDS_REGEX.search(message.content): await message.channel.send('Your Club Penguin account has been deactivated for inappropriate language.') oldnick = message.author.nick