fix logs
All checks were successful
Deploy Backend / deploy (push) Successful in 4m17s
Deploy Website / deploy (push) Successful in 5m36s

This commit is contained in:
Lee
2024-10-17 19:02:32 +01:00
parent 1350cdc0b1
commit dd8befa9e0
5 changed files with 9 additions and 7 deletions

View File

@ -40,8 +40,8 @@ export function initDiscordBot() {
* @param channelId the channel id to log to
* @param message the message to log
*/
export function logToChannel(channelId: DiscordChannels, message: EmbedBuilder) {
const channel = DiscordBot.channels.cache.find(c => c.id === channelId);
export async function logToChannel(channelId: DiscordChannels, message: EmbedBuilder) {
const channel = await DiscordBot.channels.fetch(channelId);
if (channel == undefined) {
throw new Error(`Channel "${channelId}" not found`);
}