mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 10:22:31 -05:00
Improved youtube playlist parsing, added !set avatar
Now it actually parse the whole playlist
This commit is contained in:
13
red.py
13
red.py
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user