Skip to content

Commit b3a2bb0

Browse files
authored
feat: ephemeral replies on (un)claim buttons (#580)
* new lines * ephemeral button interactions * send message to channel if interaction is ephemeral * move deferreply to use ephemeral on no perms * .editReply() -> .reply()
1 parent e53c064 commit b3a2bb0

File tree

15 files changed

+22
-18
lines changed

15 files changed

+22
-18
lines changed

src/autocomplete/references.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ module.exports = class ReferencesCompleter extends Autocompleter {
2323
}),
2424
);
2525
}
26-
};
26+
};

src/autocomplete/tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ module.exports = class TagCompleter extends Autocompleter {
4747
})),
4848
);
4949
}
50-
};
50+
};

src/buttons/claim.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module.exports = class ClaimButton extends Button {
1616
/** @type {import("client")} */
1717
const client = this.client;
1818

19-
await interaction.deferReply({ ephemeral: false });
2019
await client.tickets.claim(interaction);
2120
}
22-
};
21+
};

src/buttons/unclaim.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module.exports = class UnclaimButton extends Button {
1616
/** @type {import("client")} */
1717
const client = this.client;
1818

19-
await interaction.deferReply({ ephemeral: false });
2019
await client.tickets.release(interaction);
2120
}
22-
};
21+
};

src/commands/message/pin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ module.exports = class PinMessageCommand extends MessageCommand {
7272
],
7373
});
7474
}
75-
};
75+
};

src/commands/slash/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ module.exports = class AddSlashCommand extends SlashCommand {
141141
});
142142

143143
}
144-
};
144+
};

src/commands/slash/claim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ module.exports = class ClaimSlashCommand extends SlashCommand {
2323
await interaction.deferReply({ ephemeral: false });
2424
await client.tickets.claim(interaction);
2525
}
26-
};
26+
};

src/commands/slash/close.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ module.exports = class CloseSlashCommand extends SlashCommand {
3434
const client = this.client;
3535
await client.tickets.beforeRequestClose(interaction);
3636
}
37-
};
37+
};

src/commands/slash/help.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ module.exports = class ClaimSlashCommand extends SlashCommand {
7676
],
7777
});
7878
}
79-
};
79+
};

src/commands/slash/new.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ module.exports = class NewSlashCommand extends SlashCommand {
3535
async run(interaction) {
3636
await useGuild(this.client, interaction, { referencesTicketId: interaction.options.getString('references', false) });
3737
}
38-
};
38+
};

0 commit comments

Comments
 (0)