-
Notifications
You must be signed in to change notification settings - Fork 147
refactor(appinfo)!: improve application models #695
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
base: master
Are you sure you want to change the base?
Conversation
no functional changes
| return Widget(state=self._connection, data=data) | ||
|
|
||
| async def application_info(self) -> AppInfo: | ||
| async def application_info(self) -> BotAppInfo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it be worth caching this information? IIRC we receive the full app info on on_ready/identify when we receive the flags of the application. If not, it may be worth caching this information anyways (due to the ext.commands extension using it anyways, and this information being quite useful regardless)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caching this should be up to users, since the data could change at any time - ext.commands already caches the owner/owners, which is the only part it currently needs, and the ready event only contains app ID + flags :/
d16e21f to
53aaf1b
Compare
53aaf1b to
0f0a89b
Compare
|
@shiftinv would you please resolve conflicts? |
@onerandomusername done. |
|
@shiftinv would you please resolve conflicts again? |
c5c888a to
fb557cb
Compare
|
@shiftinv Would you please resolve conflicts? |
|
I promise I'll review it this time. |
Summary
Refactors application models, deduplicating and generally merging related code.
The diff is fairly unreadable as-is, skipping the first commit (that just moves
PartialAppInfoaboveAppInfo) improves readability quite a bit.tl;dr on the important changes, see changelog for everything:
PartialAppInfo < AppInfo < BotAppInfo(whereBotAppInfois equivalent to the oldAppInfo)AppInfo.summaryis no more (deprecated in previous version)Invite.target_application(which is nowAppInfo) contains more fieldscover_imageurl formatChecklist
task linttask pyright