Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. import discord
  2.  
  3. token = open("token.txt", "r").read()
  4.  
  5. client = discord.Client()
  6.  
  7. CurseWords = ("fuck","idiot","you are cancer","raca")
  8. prisonList = []
  9. banningList = []
  10. kickList = []
  11. admins = ["129896559616720897"]
  12.  
  13.  
  14. @client.event
  15. async def on_ready():
  16. print(f'We have logged in as {client.user}')
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. @client.event
  24. async def on_message(message):
  25.  
  26.  
  27. if message.content.startswith('!prison') and message.author.id in admins:
  28. users_to_ban = message.mentions[0]
  29. print(users_to_ban)
  30. role = discord.utils.get(server.roles, name="prison")
  31. await client.add_roles(users_to_ban, role)
  32.  
  33. for i in CurseWords:
  34. if i in message.content.lower() :
  35. await message.channel.send('stop with that')
  36. await message.channel.send(message.author)
  37.  
  38.  
  39. if message.author in kickList:
  40. banningList.remove(message.author)
  41. await message.channel.send("we will ban you now")
  42. #await kick(message.author)
  43. #await message.guild.kick(message.author)
  44.  
  45. if message.author in banningList:
  46. await message.channel.send("you have one more chance till I kick or put you ona time out you out")
  47. prisonList.remove(message.author)
  48. kickList.append(message.author)
  49.  
  50. if message.author in prisonList:
  51. await message.channel.send("you are already in a list and you have two chance left")
  52. banningList.append(message.author)
  53.  
  54.  
  55. if message.author not in prisonList and message.author not in banningList and message.author not in kickList:
  56. prisonList.append(message.author)
  57. await message.channel.send('Ive not put you on a prison list{}, you now have 3 chances left'.format(message.author))
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. print(prisonList)
  65. print(banningList)
  66. print(kickList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement