Club Penguin bot
This commit is contained in:
commit
2e4707ce16
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*~
|
||||
env/
|
||||
token
|
19
LICENSE
Normal file
19
LICENSE
Normal file
|
@ -0,0 +1,19 @@
|
|||
MIT License Copyright (c) 2020 xenofem <xenofematxenodotscience>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
13
README.md
Normal file
13
README.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# club-penguin
|
||||
|
||||
Discord bot that tells you off for saying rude words
|
||||
|
||||
## Setup
|
||||
|
||||
git clone https://git.xeno.science/xenofem/club-penguin
|
||||
cd club-penguin
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
pip install discord.py
|
||||
echo <token> > token
|
||||
python club-penguin.py
|
45
club-penguin.py
Normal file
45
club-penguin.py
Normal file
|
@ -0,0 +1,45 @@
|
|||
import discord
|
||||
import sys
|
||||
|
||||
client = discord.Client()
|
||||
|
||||
RUDE_WORDS = [
|
||||
'asshole',
|
||||
'bastard',
|
||||
'bitch',
|
||||
'boob',
|
||||
'cock',
|
||||
'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)
|
Loading…
Reference in a new issue