Skip to content

Commit

Permalink
🚑 Use editReply instead of reply. Closes #4 (deploy)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarbar338 committed Jun 2, 2023
1 parent bc2218b commit 0d77107
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/commands/leaderboards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const LeaderboardsCommand: SlashLevel.ICommand = {
xp: -1,
});

if (!ranks.length)
return interaction.editReply({
content: "No one has gained XP yet.",
});

const userIndex = ranks.findIndex(
(guildMemberData) => guildMemberData.userID === member.id,
);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/rank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const RankCommand: SlashLevel.ICommand = {
userID: member.id,
});
if (!guildMemberModel)
return interaction.reply({
return interaction.editReply({
content:
"The user you specified has no level data. How would you like to start a chat with him/her?",
});
Expand Down

0 comments on commit 0d77107

Please sign in to comment.