-
-
Notifications
You must be signed in to change notification settings - Fork 478
feat: Implement with_response For Interaction Callbacks #2711
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
…into with-response chore: Linter Fixes
…into with-response merge linting
After testing, I found that:
I tested
In all cases, the result was still
if there is something else to test pls tell me |
perhaps a large change, but it might be better if we had a proper |
@Lumabots I cannot reproduce. I am getting the correct values for @bot.command()
async def with_response(ctx: discord.ApplicationContext):
i = await ctx.defer()
print("Loading: " + str(ctx.interaction.is_loading())) |
|
When component interactions are deferred with |
Remind me later. I'm gonna check up with staff |
Summary
Implements
with_response
for interaction callbacks.This will update
Interaction._original_response
to avoid needing to make an API request when callingInteraction.original_response()
It also adds
InteractionCallback
which contains.is_loading()
and.is_ephemeral()
and is referenced throughInteraction.callback
It was decided to always enable
with_response
instead of allowing the user to specify if they want it per #discussion on Discord.The
#type: ignore
comment is because I copy pasted that code from somewhere else. They did not specify why they were ignoring.Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.