Merge pull request #6 from Art-Portal/v4.5.1

Corrected ratelimit issue
This commit is contained in:
Ninjdai 2022-11-13 18:24:50 +01:00 committed by GitHub
commit 54e77a47e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ module.exports = {
.setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[1]}`), .setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[1]}`),
]); ]);
const artist = await client.database.artists.findOne({ where: { name: interaction.user.id } }); const artist = await client.database.artists.findOne({ where: { name: interaction.user.id } });
await interaction.channel.setName((artist ? artist.emoji :"🟢")+interaction.channel.name); interaction.channel.setName((artist ? artist.emoji :"🟢")+interaction.channel.name);
await interaction.followUp({ embeds: [ await interaction.followUp({ embeds: [
new EmbedBuilder() new EmbedBuilder()
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() }) .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() })
@ -174,11 +174,11 @@ module.exports = {
.setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[2]}`), .setCustomId(`ticket_close-${interaction.customId.replace("ticket_","").split("-")[2]}`),
]); ]);
const artistUntake = await client.database.artists.findOne({ where: { name: interaction.user.id } }); const artistUntake = await client.database.artists.findOne({ where: { name: interaction.user.id } });
await interaction.channel.setName(interaction.channel.name.replace(artistUntake ? artistUntake.emoji :"🟢","")); interaction.channel.setName(interaction.channel.name.replace(artistUntake ? artistUntake.emoji :"🟢",""));
await interaction.followUp({ embeds: [ await interaction.followUp({ embeds: [
new EmbedBuilder() new EmbedBuilder()
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() }) .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() })
.setDescription(`<@${interaction.user.id}> ne prend plus en charge le ticket ! ${untakeMessage}`) .setDescription(`<@${interaction.customId.replace("ticket_","").split("-")[1]}> ne prend plus en charge le ticket ! ${untakeMessage}`)
.setColor('#ce0808') .setColor('#ce0808')
] }); ] });
await interaction.editReply({ components: [ticketRowUntaken] }); await interaction.editReply({ components: [ticketRowUntaken] });