Fixed !reload and !getplaylist

!reload now works and !getplaylist splits the message in multiple parts
This commit is contained in:
Twentysix
2016-01-04 04:37:04 +01:00
parent cf5e07851b
commit 1e8b9ab681
2 changed files with 10 additions and 4 deletions

12
red.py
View File

@@ -230,7 +230,7 @@ async def on_message(message):
elif message.content == "!talk": #prevents !talk custom command
pass
elif message.content == "!reload":
reloadSettings(message)
await reloadSettings(message)
elif message.content.startswith("!name"):
await changeName(message)
elif message.content.startswith("!cleanup"):
@@ -941,8 +941,13 @@ async def sendPlaylist(message):
for track in currentPlaylist.playlist:
msg += track
msg += "\n"
msg += "```"
await client.send_message(message.author, msg)
if len(msg) >= 1900:
msg += "```"
await client.send_message(message.author, msg)
msg = "```"
if msg != "```":
msg += "```"
await client.send_message(message.author, msg)
############## ADMIN COMMANDS ###################
@@ -1082,6 +1087,7 @@ async def removeRegex(message):
async def reloadSettings(message):
if isMemberAdmin(message):
loadDataFromFiles(True)
await client.send_message(message.channel, "`Settings and files reloaded.`")
else:
await client.send_message(message.channel, "`I don't take orders from you.`")