Register: Always defer and update replies

This commit is contained in:
2023-01-02 19:25:36 +01:00
parent c866bc08eb
commit c29c018bba

View File

@@ -8,13 +8,14 @@ module.exports = {
.setDescription("Register yourself"),
permissionLevel: 0,
async execute(interaction) {
await interaction.deferReply();
let user = await User.findOne({
where: {
discordId: interaction.user.id
}
});
if (user) {
interaction.reply({
interaction.editReply({
content: "You are already registered",
ephemeral: true
});
@@ -23,7 +24,7 @@ module.exports = {
discordId: interaction.user.id,
active: 1,
});
interaction.reply({
interaction.editReply({
content: "You are now registered",
ephemeral: false
});