mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 03:00:18 +00:00
Update play function
This commit is contained in:
parent
3654dd58ba
commit
bf7336ae8d
@ -57,13 +57,13 @@ module.exports = async function play(client, interaction, guild, station) {
|
||||
);
|
||||
|
||||
if(!radio.message){
|
||||
radio.message = await radio.textChannel.send({ embeds: [embed], components: [buttons] });
|
||||
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
||||
} else {
|
||||
if(radio.textChannel.id == radio.message.channel.id){
|
||||
radio.message.edit({ embeds: [embed], components: [buttons] });
|
||||
} else {
|
||||
radio.message?.delete();
|
||||
radio.message = await radio.textChannel.send({ embeds: [embed], components: [buttons] });
|
||||
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user