Advertisement
Guest User

Untitled

a guest
Aug 4th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. #---------------------------------------
  2. # Script Import Libraries
  3. #---------------------------------------
  4. import clr
  5. clr.AddReference("IronPython.Modules.dll")
  6.  
  7. import os
  8. import sys
  9. import json
  10.  
  11. #---------------------------------------
  12. # Script Information
  13. #---------------------------------------
  14. ScriptName = "Rabattcodes"
  15. Website = "https://www.twitch.tv/RaikunsGamezone"
  16. Description = "delete line 0 at txt doc"
  17. Creator = "RaikunsGamezone"
  18. Version = "1.0.0"
  19.  
  20. #---------------------------------------
  21. # Variables
  22. #---------------------------------------
  23.  
  24. DeleteMessage = 0
  25. SafeQuestion = False
  26. ChatCommand = "!rabatt"
  27. ChatPermission = "Moderator"
  28.  
  29. #---------------------------------------
  30. # Function
  31. #---------------------------------------
  32.  
  33. def ReloadSettings(jsondata):
  34. global SafeQuestion, ChatCommand, ChatPermission,
  35.  
  36. SafeQuestion = UISettings.SafeQuestion
  37. ChatMessages = UISettings.ChatMessages
  38. ChatPermission = UISettings.ChatPermission
  39.  
  40. if message.content.startswith('!rabatt'):
  41. msg = 'Hallo {0.author.mention}'.format(message)
  42. await client.send_message(message.channel, msg)
  43. f = file('rabatt_codes.txt','r')
  44. lines = f.readlines()
  45. f.close()
  46.  
  47. del lines[0]
  48.  
  49. f = open('rabatt_codes.txt','w')
  50.  
  51. for l in lines:
  52. f.write(l)
  53.  
  54. f.close()
  55.  
  56. else
  57. msg = 'Nutze !rabatt oder !ingame . Werde ich noch benötigt? {0.author.mention}'.format(message)
  58. f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement