fix: message too long on some extreme cases

This commit is contained in:
Terry Geng
2020-03-03 16:47:24 +08:00
parent 26345e456f
commit 499186c738
4 changed files with 9 additions and 2 deletions

View File

@ -24,7 +24,6 @@ def get_playlist_info(url, start_index=0, user=""):
playlist_title = info['title']
for j in range(start_index, min(len(info['entries']), start_index + var.config.getint('bot', 'max_track_playlist'))):
print(info['entries'][j])
# Unknow String if No title into the json
title = info['entries'][j]['title'] if 'title' in info['entries'][j] else "Unknown Title"
# Add youtube url if the url in the json isn't a full url