The code and warning suggests there should be an early return should be present here
// silence all logging channel event messages if an ID has not been set,
// yet an attempt is still being made to log something
if (loggingChannelId === '' && loggingLevel !== 0) {
botConfig.logging.loggingChannel.verboseLevel = 0;
logEvent(
EventCategory.Warning,
'core',
'No logging channel ID has been set, to prevent this warning, set `logging.loggingChannel.verboseLevel` to 0 in the config. Logging through discord will be disabled until restart.',
1
);
}
// Sending the event to the logging channel
if (loggingLevel >= verbosity) {
/**
* The actual {@link TextChannel} discord.js reference to the
* event channel
*/
const loggingChannel: TextChannel = client.channels.cache.get(
loggingChannelId
) as TextChannel;
void loggingChannel.send({embeds: [eventEmbed]});
}```
The code and warning suggests there should be an early return should be present here