.BANCHO. .FIX. Fokabot np command fixes, changed packets encoding
This commit is contained in:
@@ -367,10 +367,15 @@ def tillerinoNp(fro, chan, message):
|
||||
return False
|
||||
|
||||
# Get URL from message
|
||||
beatmapURL = str(message[3][1:])
|
||||
if message[1] == "listening":
|
||||
beatmapURL = str(message[3][1:])
|
||||
elif message[1] == "playing":
|
||||
beatmapURL = str(message[2][1:])
|
||||
else:
|
||||
return False
|
||||
|
||||
# Get beatmap id from URL
|
||||
p = re.compile("https:\\/\\/osu\\.ppy\\.sh\\/b\\/(\\d*)")
|
||||
p = re.compile("^https?:\\/\\/osu\\.ppy\\.sh\\/b\\/(\\d*)")
|
||||
beatmapID = p.search(beatmapURL).groups(0)[0]
|
||||
|
||||
# Update latest tillerino song for current token
|
||||
@@ -564,6 +569,9 @@ commands = [
|
||||
}, {
|
||||
"trigger": "ACTION is listening to [",
|
||||
"callback": tillerinoNp
|
||||
}, {
|
||||
"trigger": "ACTION is playing [",
|
||||
"callback": tillerinoNp
|
||||
}, {
|
||||
"trigger": "!with",
|
||||
"callback": tillerinoMods,
|
||||
|
Reference in New Issue
Block a user