Edited embed message and delete components when stopping radio

This commit is contained in:
Christer Warén 2021-08-31 10:38:21 +03:00
parent bdc76b73a7
commit 7a93cd001f

View File

@ -17,13 +17,13 @@ module.exports = {
.setTitle(client.user.username)
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["stop"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor)
.addField(client.messages.nowplayingTitle, "Nothing", true)
.addField(client.messages.nowplayingTitle, "-", true)
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
if(!radio.message){
radio.message = await radio.textChannel.send({ embeds: [embed] });
radio.message = await radio.textChannel.send({ embeds: [embed], components: [] });
} else {
radio.message.edit({ embeds: [embed] });
radio.message.edit({ embeds: [embed], components: [] });
}
setTimeout(function() {