Skip to content

Conversation

@CaedenPH
Copy link

@CaedenPH CaedenPH commented Aug 2, 2022

About

This pull request is about (X), which does (Y).

Checklist

  • I've ran pre-commit to format and lint the change(s) made.
  • I've checked to make sure the change(s) work on 3.8.6 and higher.
  • This fixes/solves an Issue (If existent):.
    • resolves #
  • I've made this pull request for/as: (check all that apply)
    • Documentation
    • Breaking change
    • New feature/enhancement
    • Bugfix

FayeDel and others added 4 commits July 14, 2022 16:26
@mAxYoLo01
Copy link
Contributor

Please make sure to track the unstable branch, currently it is the stable one.

Copy link
Contributor

@EepyElvyra EepyElvyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request is about (X), which does (Y).

Also please explain why you want this change since I don't know anything about the intentions of this PR/why the change should be implemented/...

Also, as already mentioned, please target the unstable branch for your pr

@CaedenPH CaedenPH changed the base branch from stable to unstable August 2, 2022 21:47
@CaedenPH
Copy link
Author

CaedenPH commented Aug 2, 2022

This pull request is about (X), which does (Y).

Also please explain why you want this change since I don't know anything about the intentions of this PR/why the change should be implemented/...

Also, as already mentioned, please target the unstable branch for your pr

When printing client.me, a user is left with an unfriendly Application instance, this would mean that it prints the username.

@Catalyst4222
Copy link
Contributor

A better way to give more information about it would be to add a __repr__ to the class, or to the user field. Using __str__ to give information when printing data usually isn't the best way to do it

@Catalyst4222
Copy link
Contributor

A better way to give more information about it would be to add a __repr__ to the class, or to the user field. Using __str__ to give information when printing data usually isn't the best way to do it

attr_utils.field has a repr param, if you set that to True it'll show up when you print it out. When I add id and name to the repr, it prints (in my case) as Application(id=Snowflake(835925027337273354), name='CataBot 2.0'), which is more descriptive without tricking the user into thinking it's a string

@FayeDel FayeDel added the enhancement New feature or request label Aug 3, 2022
Copy link
Contributor

@EepyElvyra EepyElvyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put repr=True into @define() above the application class as suggested.

Failure to do this within 3 days will resolve the PR being closed (due to inactivity)

@EepyElvyra
Copy link
Contributor

Closing in favour of #1026

@EepyElvyra EepyElvyra closed this Aug 20, 2022
@interactions-py interactions-py locked as resolved and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants