temporarily change nicknames of 'banned' users
This commit is contained in:
parent
c4cd3af702
commit
4b351648f7
|
@ -1,3 +1,4 @@
|
||||||
|
import asyncio
|
||||||
import discord
|
import discord
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -40,6 +41,10 @@ async def on_message(message):
|
||||||
|
|
||||||
if any(w in message.content for w in RUDE_WORDS):
|
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.')
|
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:
|
with open('token') as f:
|
||||||
token = f.read().strip()
|
token = f.read().strip()
|
||||||
|
|
Loading…
Reference in a new issue