Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #---------------------------------------
- # Script Import Libraries
- #---------------------------------------
- import clr
- clr.AddReference("IronPython.Modules.dll")
- import os
- import sys
- import json
- #---------------------------------------
- # Script Information
- #---------------------------------------
- ScriptName = "Rabattcodes"
- Website = "https://www.twitch.tv/RaikunsGamezone"
- Description = "delete line 0 at txt doc"
- Creator = "RaikunsGamezone"
- Version = "1.0.0"
- #---------------------------------------
- # Variables
- #---------------------------------------
- DeleteMessage = 0
- SafeQuestion = False
- ChatCommand = "!rabatt"
- ChatPermission = "Moderator"
- #---------------------------------------
- # Function
- #---------------------------------------
- def ReloadSettings(jsondata):
- global SafeQuestion, ChatCommand, ChatPermission,
- SafeQuestion = UISettings.SafeQuestion
- ChatMessages = UISettings.ChatMessages
- ChatPermission = UISettings.ChatPermission
- if message.content.startswith('!rabatt'):
- msg = 'Hallo {0.author.mention}'.format(message)
- await client.send_message(message.channel, msg)
- f = file('rabatt_codes.txt','r')
- lines = f.readlines()
- f.close()
- del lines[0]
- f = open('rabatt_codes.txt','w')
- for l in lines:
- f.write(l)
- f.close()
- else
- msg = 'Nutze !rabatt oder !ingame . Werde ich noch benötigt? {0.author.mention}'.format(message)
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement