Skip to content

Commit

Permalink
fix(level): send error message as editReply instead of reply (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
wopian authored May 13, 2023
1 parent 4f98569 commit cb084bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const replyNoLevels = async (
)
.setTimestamp()

await interaction.reply({ embeds: [embed], ephemeral: true })
await interaction.editReply({ embeds: [embed] })
}

export const level: Command = {
Expand Down Expand Up @@ -146,8 +146,8 @@ export const level: Command = {
query: { id: levels.levels[0].id }
})
}
} catch (error: unknown) {
errorReply(interaction, level ? level.name : 'Unknown level', error)
} catch {
await replyNoLevels(interaction, true)
}
}
}

0 comments on commit cb084bf

Please sign in to comment.