import discord import sys client = discord.Client() RUDE_WORDS = [ 'asshole', 'bastard', 'bitch', 'boob', 'cock', 'crap', 'cunt', 'damn', 'dick', 'dildo', 'fuck', 'hell', 'penis', 'porn', 'sex', 'shit', 'slut', 'tiddy', 'tiddies', 'tits', 'titty', 'titties', 'vagina' ] @client.event async def on_ready(): print('logged in as {0.user}'.format(client), file=sys.stderr) @client.event async def on_message(message): if message.author == client.user: return if any(w in message.content for w in RUDE_WORDS): await message.channel.send('Your Club Penguin account has been deactivated for inappropriate language.') with open('token') as f: token = f.read().strip() client.run(token)