mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: don't allow removing the creator
This commit is contained in:
parent
bb3179f28f
commit
457ede3ac7
@ -89,7 +89,7 @@ module.exports = class RemoveSlashCommand extends SlashCommand {
|
|||||||
const ticketChannel = await interaction.guild.channels.fetch(ticket.id);
|
const ticketChannel = await interaction.guild.channels.fetch(ticket.id);
|
||||||
const member = interaction.options.getMember('member', true);
|
const member = interaction.options.getMember('member', true);
|
||||||
|
|
||||||
if (member.id === client.user.id) {
|
if (member.id === client.user.id || member.id === ticket.createdById) {
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new ExtendedEmbedBuilder()
|
new ExtendedEmbedBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user