dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
683 stars 162 forks source link

Wrong user default avatar #272

Closed JU5TDIE closed 2 years ago

JU5TDIE commented 2 years ago

Summary

discord.py-self library uses unused pink default avatar

Reproduction Steps

In enums.py - DefaultAvatar class, there is pink = 5, which is for pink default avatar. Discord doesn't use pink avatar as default avatar and this pink = 5 breaks the formula discriminator % 5 and shows the wrong default avatar

Code

import discord
from discord.ext import commands

client = commands.Bot(command_prefix='.', self_bot=True)

@client.command()
async def default_avatar(ctx, user : discord.User):
    await ctx.send(user.default_avatar)

client.run(token)

Expected Results

If I use .default_avatar Example#4881, it will send https://cdn.discordapp.com/embed/avatars/1.png

Actual Results

But it sends https://cdn.discordapp.com/embed/avatars/3.png

System Information

Checklist

Additional Information

Why did you add pink = 5 on this commit? Am I missing something?

dolfies commented 2 years ago

I added 5 because it exists but isn't used, so people could get the CDN link manually.

Forgot the handling just lens the enum, though.

JU5TDIE commented 2 years ago

Isn't it % 5?

dolfies commented 2 years ago

I'm actually braindead

dolfies commented 2 years ago

Fixed