Corrected a forgotten line

Added ability to remove an artist's emoji when command untaken
This commit is contained in:
ninjdai1 2022-11-13 17:57:34 +01:00
parent 8a41e684a0
commit 651fbaa6f9

View File

@ -173,7 +173,8 @@ module.exports = {
.setEmoji("🔒")
.setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[2]}`),
]);
await interaction.channel.setName(interaction.channel.name.replace("🟢",""));
const artistUntake = await client.database.artists.findOne({ where: { name: interaction.user.id } });
await interaction.channel.setName(interaction.channel.name.replace(artistUntake ? artistUntake.emoji :"🟢",""));
await interaction.followUp({ embeds: [
new EmbedBuilder()
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() })