mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 04:20:19 +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){
|
if(!radio.message){
|
||||||
radio.message = await radio.textChannel.send({ embeds: [embed], components: [buttons] });
|
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
||||||
} else {
|
} else {
|
||||||
if(radio.textChannel.id == radio.message.channel.id){
|
if(radio.textChannel.id == radio.message.channel.id){
|
||||||
radio.message.edit({ embeds: [embed], components: [buttons] });
|
radio.message.edit({ embeds: [embed], components: [buttons] });
|
||||||
} else {
|
} else {
|
||||||
radio.message?.delete();
|
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