This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@bot.command() | |
@commands.is_owner() | |
async def default(ctx): | |
""" Setting our bot avatar to the default """ | |
# Fetching our file | rb = Read Binary | |
with open("assets/defaultavatar.png", "rb") as image: | |
f = image.read() # Reading the image | |
b = bytearray(f) # Making it a bytes-like object | |
await self.bot.user.edit(avatar=b) # Editing our bots avatar | |
await ctx.send('Avatar set to default') |