Improved youtube playlist parsing, added !set avatar

Now it actually parse the whole playlist
This commit is contained in:
Twentysix
2016-02-26 18:56:15 +01:00
parent 12033f1746
commit b1511984ec
2 changed files with 23 additions and 16 deletions

13
red.py
View File

@@ -11,6 +11,7 @@ import os
import time
import sys
import logging
import aiohttp
#
# Red, a Discord bot by Twentysix, based on discord.py and its command extension
@@ -219,6 +220,18 @@ async def status(ctx, *status : str):
await bot.change_status(None)
await bot.say("Done.")
@_set.command()
@checks.is_owner()
async def avatar(url : str):
"""Sets Red's avatar"""
try:
async with aiohttp.get(url) as r:
data = await r.read()
await bot.edit_profile(settings["PASSWORD"], avatar=data)
await bot.say("Done.")
except:
await bot.say("Error.")
@bot.command()
@checks.is_owner()
async def shutdown():