#PyCord bug
1 messages · Page 1 of 1 (latest)
It's not a bug
it usually happens when you take too long (3s) to respond to an interaction, and is intended design
okay, but he's telling me it's the defer that's causing the interaction error.
show your code
ok
@discord.Cog.listener()
async def on_interaction(self, interaction):
if interaction.type == discord.InteractionType.component:
if interaction.data["custom_id"] == "plus":
await interaction.response.defer(ephemeral=True) # code crash here
what ?
you should never override that event
I don't understand
leave on_interaction alone, its the entire brains of your bot regarding interactions
whatever you want to do, you can do it without overriding that event
what do you even want to do
It's a plugins to made a counter. I use this event because my button after reload does'nt respond
Yes but it's dynamic button, my users can be change the name, color, emoji of btn
all possible
and before, I have tried this with persistant view and I have the same error
yea, but start by not overriding this event
this
not overriding ?
yes, just delete that
what do I do next?
try to figure your stuff out using persistent views :)
there's a guide on that i think, and the docs in general of course
Ok thanks
I have another question
I have shard, how to log if my shard disconnect and reconnect ?
how to log the reconnection
This section outlines the different types of events listened by Client. There are 3 ways to register an event, the first way is through the use of Client.event(). The second way is through subclass...
Ok thanks you so much
that's a listener, listeners do not override
oh right