Goal of the command is to change my bot's profile picture. I'm confused because without the self argument, I get an exception about missing the argument 'self'. When I add 'self', it says self is not defined. What argument am I missing?
With self argument
@bot.slash_command(guild_ids=[servers])
async def force_pfp(ctx):
with open('/path/to/picture', 'rb') as image:
await discord.ClientUser.edit(self, avatar=image)
await ctx.respond('PFP changed')
without self argument
@bot.slash_command(guild_ids=[servers])
async def force_pfp(ctx):
with open('/path/to/picture', 'rb') as image:
await discord.ClientUser.edit(avatar=image)
await ctx.respond('PFP changed')
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: ClientUser.edit() missing 1 required positional argument: 'self'