fix: check for empty strings

Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
This commit is contained in:
Ryan Cao 2023-05-24 17:17:15 +08:00 committed by GitHub
parent b11b564e2d
commit e1f8443eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ export const sayCommand = async (
const message = await interaction.channel.send(content); const message = await interaction.channel.send(content);
await interaction.editReply('I said what you said!'); await interaction.editReply('I said what you said!');
if (typeof process.env.SAY_LOGS_CHANNEL === 'string') { if (process.env.SAY_LOGS_CHANNEL) {
const logsChannel = await interaction.guild.channels.fetch( const logsChannel = await interaction.guild.channels.fetch(
process.env.SAY_LOGS_CHANNEL process.env.SAY_LOGS_CHANNEL
); );