temporarily change nicknames of 'banned' users
This commit is contained in:
parent
c4cd3af702
commit
4b351648f7
|
@ -1,3 +1,4 @@
|
|||
import asyncio
|
||||
import discord
|
||||
import sys
|
||||
|
||||
|
@ -28,7 +29,7 @@ RUDE_WORDS = [
|
|||
'titties',
|
||||
'vagina'
|
||||
]
|
||||
|
||||
|
||||
@client.event
|
||||
async def on_ready():
|
||||
print('logged in as {0.user}'.format(client), file=sys.stderr)
|
||||
|
@ -40,6 +41,10 @@ async def on_message(message):
|
|||
|
||||
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.')
|
||||
oldnick = message.author.nick
|
||||
await message.author.edit(nick="BANNED")
|
||||
await asyncio.sleep(300)
|
||||
await message.author.edit(nick=oldnick)
|
||||
|
||||
with open('token') as f:
|
||||
token = f.read().strip()
|
||||
|
|
Loading…
Reference in a new issue