#YesOrNine - Replied and such

1 messages · Page 1 of 1 (latest)

harsh solstice
#

@potent ember Can you share the full code here?

potent ember
#
async execute(int, client) {
        await int.deferReply();
        
        return int.editReply({ embeds: [ListEmbed] }).catch(() => { });
}
harsh solstice
#

ok, and what runs that execute?

potent ember
#
try {
    return command.execute(int, client);
} catch (error) {
    console.error(error);
    return outputErr(int, 404);
}
``` interactionCreate event
harsh solstice
#

And the code before that code, doesn't include int.deferReply()

potent ember
#

its not looping, id receive an error for only replying too

potent ember
harsh solstice
#

Where does ListEmbed come from btw?

potent ember
#

its defined somewhere in between but doesnt matter here

harsh solstice
#

Fair

#

Can you share the error stack?

potent ember
#
DiscordAPIError: Unknown interaction
    at RequestHandler.execute (/root/kaede/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/root/kaede/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
    at async CommandInteraction.deferReply (/root/kaede/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:57:5)
    at async Object.execute (/root/kaede/src/bot/commands/list.js:8:3) {
  method: 'post',
  path: '/interactions/960896475603288064/aW50ZXJhY3Rpb246OTYwODk2NDc1NjAzMjg4MDY0Om5hWk5BRFFMVkdGRlNCT3NXQU41WVluU1JVUXIxeUY3UFlhbDRYdE81c1JiRU5SWEhSbGxwQklMdGVrTGtJengyV282d21GMmNVanFsSGZhcXdONW8xaGd2WGtyN2RJaXZ3eUdkNzVIWTdQMVlJbEtnbjdSS3B6VjRvbHBzdW1H/callback',
  code: 10062,
  httpStatus: 404,
  requestData: { json: { type: 5, data: { flags: undefined } }, files: [] }
}
harsh solstice
#

Let's check the timing.
Can you stick console.log('Start', new Date().toISOString()) after the interactionCreate function starts

#

and console.log('Defer', new Date().toISOString()) before the deferReply

rocky sluice
#

u relize u can just do console.time() and console.timeEnd() after deferReply ...

harsh solstice
simple mirage
#

you guys are just gonna come up with the same answer or a wrong answer

rocky sluice
harsh solstice
velvet hound
rocky sluice
#

that is super basic

velvet hound
#

followUp does the same thing

rocky sluice
harsh solstice
#

From what I see so far, they have the same code I do.
They do deferReply and then editReply so I fail to see the issue so far.

obtuse wigeon
#

stop... jessus

tidal zealot
#

There's a possibility that you're running 2 instances at one time

rocky sluice
potent ember
#

its not, believe me

simple mirage
#

Alright. We should end it here.

You are either replying twice, or taking too long. Final answer

potent ember
#

neither is it though

rocky sluice
#

or u are using another interaction response inside ur interaction create

harsh solstice
#

@rocky sluice & @simple mirage
I made a thread to keep it out of #djs-help-v14
Would you kindly go away if you're going to say the same things over and over.
It is MY CHOICE to help them here.

rocky sluice
#

on the same interaction

simple mirage
velvet hound
rocky sluice
#

unknown interaction

potent ember
#

stack trace is above

harsh solstice
tidal zealot
#

I bet there's another instance

#

Try any other commands and you should face the same issue

obtuse wigeon
#

do you know what running two instances means? no offence

harsh solstice
#

Humm, good point, YesOrNine can you try a different command?

potent ember
obtuse wigeon
potent ember
harsh solstice
obtuse wigeon
obtuse wigeon
#

to get interaction callbacks?

potent ember
#

no

harsh solstice
# potent ember nope only the host

ok, can you add a console.log when your interactionCreate callback starts, so we can be 100% that it doesn't log twice.
Or if you have no access to logs, add a message to a internal channel, I assume you have a dev server

rocky sluice
#

putting a log doesn't tell u that they have 2 instances, since that other instance cud probly be done after a second which isn't fast enuf to cause that issue

harsh solstice
rocky sluice
#

then do so, if u dont want other opinions... On someone issue.