unknown interaction

https://srcb.in/YJH6fadJ2G Seem to not like my code
SourceBin
disn
Instantly share your code with the world.
19 Replies
d.js toolkit
d.js toolkit•3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
d.js docs
d.js docs•3y ago
Common causes of DiscordAPIError[10062]: Unknown interaction: - Initial response took more than 3 seconds âžž defer the response *. - Wrong interaction object inside a collector. * Note: you cannot defer modal or autocomplete value responses
Apex
ApexOP•3y ago
@luna🌈 thank u but that actually isn't the fix for this sadly Attempted this and noticed it did nothing different, there's something else
treble/luna
treble/luna•3y ago
where did you defer
Apex
ApexOP•3y ago
On any interaction after the await Then I did a great thing of commenting out my 3 replies, that did nothing to still unknown interaction
treble/luna
treble/luna•3y ago
You should defer at the top of your code
Apex
ApexOP•3y ago
? Where? I'm not seeing it Oh I see why I don't see it. I changed that file. So that file is completely bulletproof now It's my index that's the issue I resolved it to that as I turned on bot and literally just let it sit and it popped up No command ram
Apex
ApexOP•3y ago
SourceBin
r
Instantly share your code with the world.
treble/luna
treble/luna•3y ago
i dont know what you mean but depending on how many guilds your bot is in this might get you ratelimited https://bork.treble-is-fluffy.gay/floofe947e718.png
Apex
ApexOP•3y ago
I have it only in 1 at the moment @luna🌈 so I got all of the commands reworked with the reply system. But now my index is for some reason not banning users who are blacklisted and not whitelisted
d.js docs
d.js docs•3y ago
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops. - Once you do, log relevant values and if-conditions - More sophisticated debugging methods are breakpoints and runtime inspections: learn more
Apex
ApexOP•3y ago
SourceBin
dj
Instantly share your code with the world.
treble/luna
treble/luna•3y ago
if you plan on making the bot public, i highly recommend taking a different approach
Apex
ApexOP•3y ago
Yeah it's set to be public
treble/luna
treble/luna•3y ago
just use guild.bans.create
Apex
ApexOP•3y ago
Servers can whitelist blacklisted people
treble/luna
treble/luna•3y ago
doesnt require you to fetch the member
Apex
ApexOP•3y ago
So something like Guild.bans.create({ member.Id, reason})
d.js docs
d.js docs•3y ago
method GuildBanManager#create() Bans a user from the guild.

Did you find this page helpful?