Skip to content

Commit

Permalink
remove discriminators for pomelo users (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
helloimalastair authored May 31, 2024
1 parent 3845b7f commit a69aece
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/handlers/modal-submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ export default async function (
},
],
username:
interaction.member?.nick ??
`${interaction.member?.user.username}#${interaction.member.user.discriminator}`,
interaction.member?.nick ?? interaction.member?.user.discriminator === "0"
? `${interaction.member.user.username}#${interaction.member.user.discriminator}`
: interaction.member.user.username,
avatar_url: GetMemberAvatar(interaction.member, interaction.guild_id),
} as RESTPostAPIWebhookWithTokenJSONBody),
});
Expand Down

0 comments on commit a69aece

Please sign in to comment.