diff --git a/interactions/buttons/src/ticket/ticket.js b/interactions/buttons/src/ticket/ticket.js index 0396d1b..0e8b165 100644 --- a/interactions/buttons/src/ticket/ticket.js +++ b/interactions/buttons/src/ticket/ticket.js @@ -181,62 +181,6 @@ module.exports = { ] }); await interaction.editReply({ components: [ticketRowUntaken] }); break; - - case 'takeTicket': - if(!interaction.member.roles.cache.has('778016554066640896')) return interaction.reply({ content: "Vous n'avez pas la permission de faire cela !", ephemeral: true }); - const staffticketRowTaken = new ActionRowBuilder() - .addComponents([ - new ButtonBuilder() - .setLabel("Annuler la prise en charge") - .setStyle(ButtonStyle.Danger) - .setEmoji("โŒ") - .setCustomId(`ticket_cancelTakenTicket-${interaction.user.id}-${interaction.customId.replace("ticket_","").split("-")[1]}`), - new ButtonBuilder() - .setLabel("Fermer le ticket") - .setStyle(ButtonStyle.Danger) - .setEmoji("๐Ÿ”’") - .setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[1]}`), - ]); - await interaction.channel.setName("๐ŸŸข"+interaction.channel.name); - await interaction.followUp({ embeds: [ - new EmbedBuilder() - .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() }) - .setDescription(`<@${interaction.user.id}> prend en charge le ticket !`) - .setColor('#34f213') - ] }); - await interaction.editReply({ components: [staffticketRowTaken] }); - break; - - case 'cancelTakenTicket': - let untakeTicketMessage; - if (interaction.user.id == interaction.customId.replace("ticket_","").split("-")[1]) untakeTicketMessage = "(Annulation par le staff)" - else if (interaction.member.permissions.has(PermissionFlagsBits.Administrator)) untakeTicketMessage = "(Annulation par un administrateur)" - else{ - await interaction.editReply(); - return interaction.followUp({ content: `Vous n'avez pas la permission de faire รงa !`, ephemeral: true }); - } - const staffticketRowUntaken = new ActionRowBuilder() - .addComponents([ - new ButtonBuilder() - .setLabel("Prendre en charge") - .setStyle(ButtonStyle.Success) - .setEmoji("โœ") - .setCustomId(`ticket_takeTicket-${interaction.customId.replace("ticket_","").split("-")[2]}`), - new ButtonBuilder() - .setLabel("Fermer le ticket") - .setStyle(ButtonStyle.Danger) - .setEmoji("๐Ÿ”’") - .setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[2]}`), - ]); - await interaction.channel.setName(interaction.channel.name.replace("๐ŸŸข","")); - await interaction.followUp({ embeds: [ - new EmbedBuilder() - .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() }) - .setDescription(`<@${interaction.user.id}> ne prend plus en charge le ticket ! ${untakeTicketMessage}`) - .setColor('#ce0808') - ] }); - await interaction.editReply({ components: [staffticketRowUntaken] }); - break; } } } \ No newline at end of file diff --git a/interactions/modals/src/tickets/report.js b/interactions/modals/src/tickets/report.js index 59dc08e..de04a42 100644 --- a/interactions/modals/src/tickets/report.js +++ b/interactions/modals/src/tickets/report.js @@ -33,11 +33,6 @@ module.exports = { }).then(async channel => { var btnrowTicket = new ActionRowBuilder() .addComponents([ - new ButtonBuilder() - .setLabel("Prendre en charge") - .setStyle(ButtonStyle.Success) - .setEmoji("โœ") - .setCustomId(`ticket_takeTicket-${interaction.user.id}`), new ButtonBuilder() .setLabel("Fermer le ticket") .setStyle(ButtonStyle.Danger) diff --git a/interactions/selectmenus/src/tickets/ticket.js b/interactions/selectmenus/src/tickets/ticket.js index da7b22d..6c93923 100644 --- a/interactions/selectmenus/src/tickets/ticket.js +++ b/interactions/selectmenus/src/tickets/ticket.js @@ -122,11 +122,6 @@ module.exports = { var btnrowTicket = new ActionRowBuilder() .addComponents([ - new ButtonBuilder() - .setLabel("Prendre en charge") - .setStyle(ButtonStyle.Success) - .setEmoji("โœ") - .setCustomId(`ticket_takeTicket-${interaction.user.id}`), new ButtonBuilder() .setLabel("Fermer le ticket") .setStyle(ButtonStyle.Danger)