Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add avatar_url to user Mixins #1528

Merged
merged 3 commits into from
Aug 10, 2023
Merged

fix: add avatar_url to user Mixins #1528

merged 3 commits into from
Aug 10, 2023

Conversation

maksims8
Copy link
Contributor

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

Changes

Add avatar_url property to Mixins in user.pyi

Related Issues

Implements issue: #1525

Test Scenarios

import interactions

intents = interactions.Intents.DEFAULT
client = interactions.Client(intents=intents)

@interactions.listen()
async def on_ready():
    print("Client has connected to Discord.")

@interactions.slash_command("test", "A test command")
@interactions.slash_user_option("User to get avatar from.", required=True)
async def test_command(ctx: interactions.SlashContext, user: interactions.User):
    await ctx.defer()
    user_avatar = user.avatar_url
    await ctx.respond(user_avatar)

client.start("TOKEN")

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

interactions/models/discord/user.pyi Outdated Show resolved Hide resolved
@AstreaTSS AstreaTSS merged commit 450e38b into interactions-py:unstable Aug 10, 2023
@maksims8 maksims8 deleted the unstable branch August 10, 2023 20:10
@maksims8 maksims8 restored the unstable branch August 10, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants