Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Put this inside of the OnMessage function. ([] are optional, prevents mods from being kicked for caps.)
- #Kick CapsLock and send a message
- if message.content.isupper() and len(message.content) > 5 [and IsMod(message.author) == False] :
- client.send_message(message.author, "You have been kicked from the server for all caps. Please avoid doing this in the future. Feel free to rejoin, however repeating this action may result in heavier sanctions.")
- client.kick(message.server, message.author)
- client.send_message(message.channel, message.author.name+" was kicked for using all caps.")
- [
- #Put this near the top of the script
- def IsMod(member):
- for x in member.roles:
- if x.name == "Moderator":
- return True
- return False
- ]
Advertisement
Add Comment
Please, Sign In to add comment