Skip to content

[BUG] Application icon_url property returns an error when none of any picture is set for the application on discord.com/developers #673

@B1ue-Dev

Description

@B1ue-Dev

Describe the bug.

Previously, on Pull Request #656, I added a property to get the Application's icon URL with icon_url. However, I realized that I understood the wrong way between how Application icon and user icon works. My bad first.

Next pull request will be for fixing this specific problem.

List the steps.

  1. Remove all picture/avatar on the Application.
  2. Get bot.me.icon_url.
  3. Print out the Application's picture URL.

What you expected.

I was expecting to see the returned URL.

What you saw.

I got this from the terminal:

Task exception was never retrieved
future: <Task finished name='Task-16' coro=<test() done, defined at .\Articuno\bot.py:30> exception=AttributeError("'Application' object has no attribute 'discriminator'")>
Traceback (most recent call last):
  File ".\Articuno\bot.py", line 41, in test
    text=f'{bot.me.icon_url}',
  File ".\Articuno\venv\lib\site-packages\interactions\api\models\team.py", line 134, in icon_url
    url += f"embed/avatars/{int(self.discriminator) % 5}.png"
AttributeError: 'Application' object has no attribute 'discriminator'

What version of the library did you use?

unstable

Version specification

No response

Code of Conduct

  • I agree to follow the contribution requirements.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions