Skip to content

Commit 35859ce

Browse files
kronosapiensclaude
andauthored
fix: replace deprecated fetchReply with withResponse in /bow command (#11)
Discord.js deprecated the fetchReply option in favor of withResponse. The new API returns the message via response.resource.message. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9ffaf5c commit 35859ce

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

backend/src/commands/bow.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,16 @@ export async function execute(interaction: ChatInputCommandInteraction): Promise
6262

6363
// Post the recognition message
6464
const emoji = getDojoEmoji();
65-
const message = await interaction.reply({
65+
const response = await interaction.reply({
6666
content: `**${reactor}** ${emoji}'d **${targetUser}**: ${reason}`,
67-
fetchReply: true,
67+
withResponse: true,
6868
});
69+
const message = response.resource?.message;
70+
71+
if (!message) {
72+
console.error('Failed to get message from interaction response');
73+
return;
74+
}
6975

7076
// Insert reaction into database
7177
const inserted = await insertReaction(message.id, targetUser.id, reactor.id, reactorRole);

0 commit comments

Comments
 (0)