Skip to content

Commit

Permalink
Fix user parameter of list command
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeAspy committed Jul 7, 2023
1 parent 8f5567b commit 40f5881
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commands/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export const data = new SlashCommandBuilder()
);

export async function execute(interaction: ChatInputCommandInteraction) {
const user = interaction.user;
let user = interaction.user;
if (interaction.options.getUser('user')) {
user = interaction.options.getUser('user')!;
}
const badges = await getBadges(user.id, 'all');
const returnEmbed = new EmbedBuilder()
.setTitle(`${user.username}'s Badges`)
Expand Down

0 comments on commit 40f5881

Please sign in to comment.