Which package is this bug report for?
discord.js
Issue description
Steps to reproduce:
- Replace
Bun.env.TOKEN with your bot's token
- bun run sample.ts
- use /ping on the bot
- See "<application> is thinking..." forever
From my testing it either awaits deferReply forever, or throws both The reply to this interaction has not been sent or deferred. and Interaction has already been acknowledged.
Works completely fine with node and deno
Code sample
import { Client, Events, MessageFlags } from "discord.js";
const client = new Client({ intents: [] });
const sleep = (ms:number) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
client.once(Events.ClientReady, (readyClient) => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
client.on(Events.InteractionCreate, async (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName == "ping") {
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
await sleep(1000)
await interaction.editReply({ content: "pong" });
}
});
client.login(Bun.env.TOKEN);
Versions
- discord.js: 14.24.2
- Bun: 1.3.2
- OS: archlinux 6.17.8-arch1-1
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
02fc101
Which package is this bug report for?
discord.js
Issue description
Steps to reproduce:
Bun.env.TOKENwith your bot's tokenFrom my testing it either awaits deferReply forever, or throws both
The reply to this interaction has not been sent or deferred.andInteraction has already been acknowledged.Works completely fine with node and deno
Code sample
Versions
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
02fc101