예제 #1
0
def skip(message, sender):
    try:
        if adminmode and sender == adminnumber:
            if party.getQueueSize() > 0:
                song = speakermanager.getTrackInfo()
                speakermanager.skip()
                sendtext(sender, config['DEFAULT']['ai_name'] + ": " + "You sent a skip command for " + song[0] + " by " + song[2] + ".")
            else:
                sendtext(sender, config['DEFAULT']['ai_name']  + ": " + "No song to skip :(")
    except:
        sendtext(sender, config['DEFAULT']['ai_name']  + ": " +  "No song to skip :(")
예제 #2
0
def list(message, sender):
    if party.getQueueSize() > 0:
        for q in party.queues:
            msg =  config['DEFAULT']['ai_name'] + ": " + "Songs in queue:\n"
            for song in party.queues[q]:
                if song[1] is not None:
                    msg += song[0] + " by " + song[1] + "\n"
                else:
                    msg += song[0]
        sendtext(sender, msg)
    else:
        sendtext(sender, config['DEFAULT']['ai_name'] + ": " + "No song in queue.")
예제 #3
0
def list(message, sender):
    if party.getQueueSize() > 0:
        for q in party.queues:
            msg = config['DEFAULT']['ai_name'] + ": " + "Songs in queue:\n"
            for song in party.queues[q]:
                if song[1] is not None:
                    msg += song[0] + " by " + song[1] + "\n"
                else:
                    msg += song[0]
        sendtext(sender, msg)
    else:
        sendtext(sender,
                 config['DEFAULT']['ai_name'] + ": " + "No song in queue.")
예제 #4
0
def skip(message, sender):
    try:
        if adminmode and sender == adminnumber:
            if party.getQueueSize() > 0:
                song = speakermanager.getTrackInfo()
                speakermanager.skip()
                sendtext(
                    sender, config['DEFAULT']['ai_name'] + ": " +
                    "You sent a skip command for " + song[0] + " by " +
                    song[2] + ".")
            else:
                sendtext(
                    sender,
                    config['DEFAULT']['ai_name'] + ": " + "No song to skip :(")
    except:
        sendtext(sender,
                 config['DEFAULT']['ai_name'] + ": " + "No song to skip :(")