From bf7336ae8da9155bc611b63c7eb861c738b0f2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Wed, 6 Apr 2022 22:47:01 +0300 Subject: [PATCH] Update play function --- src/client/funcs/play.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/funcs/play.js b/src/client/funcs/play.js index 5e3294d..b6763ab 100644 --- a/src/client/funcs/play.js +++ b/src/client/funcs/play.js @@ -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] }); } }