diff --git a/commands/chat.js b/commands/chat.js index c5cebf4..3703e12 100644 --- a/commands/chat.js +++ b/commands/chat.js @@ -36,7 +36,7 @@ module.exports = { if (maxTokens) params._max_tokens = maxTokens; var gptResponse = await libCore.getChat(promptText, params); - await interaction.reply(`${interaction.member.user} ${gptResponse}`); + await interaction.editReply(`${interaction.member.user} ${gptResponse}`); // Needs reply code to reply to the generation }catch(err){ diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 47efcdc..896ea73 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -22,6 +22,7 @@ module.exports = { await authorizeCommand(interaction, command, async () => { await authorizeTokenUsage(interaction, command, async () => { try { + if (command.deferInitialReply) await interaction.deferReply({ ephemeral: true }); command.execute(interaction); } catch (error) { log.ERROR(error);