Beispiel #1
0
def addPutasPhraseAndUpdate(message):
    try:
        myfile = filemanager.MyFile('putasphrases', False, False, True)
        mytext = message.text + '\n'
        myfile.write_line(mytext.split(' ', 1)[1])
        loadPutasPhrases()
        return True
    except:
        return False
Beispiel #2
0
def delPhraseAndUpdate(message):
    try:
        linenum = int(message.text.split(' ', 1)[1]) - 1
        myglobals.PHRASES.pop(linenum)
        myfile = filemanager.MyFile('phrases', False, True, False)
        myfile.write_all(myglobals.PHRASES)
        loadPhrases()
        return True
    except:
        return False
Beispiel #3
0
def addPutasAndUpdate(message):
    try:
        myfile = filemanager.MyFile('putas', False, False, True)
        mytext = message.text + '\n'
        if '@' in mytext:
            myfile.write_line(mytext.split(' ', 1)[1])
            loadPutas()
            return True
        else:
            return False
    except:
        return False
Beispiel #4
0
def loadChannels():
    myfile = filemanager.MyFile('channels', True, False, False)
    myglobals.CHANNELS = myfile.read_lines()
Beispiel #5
0
def saveChannel(channel, write, append):
    myfile = filemanager.MyFile('channels', False, write, append)
    myfile.write_line(str(channel) + "\n")
    loadChannels()
Beispiel #6
0
def loadPutas():
    myfile = filemanager.MyFile('putas', True, False, False)
    myglobals.PUTAS = myfile.read_lines()
Beispiel #7
0
def loadPutasPhrases():
    myfile = filemanager.MyFile('putasphrases', True, False, False)
    myglobals.PUTASPHRASES = myfile.read_lines()