diff --git a/backend/src/plugins/Spam/util/logAndDetectMessageSpam.ts b/backend/src/plugins/Spam/util/logAndDetectMessageSpam.ts index b5f9bbba..e34b34c2 100644 --- a/backend/src/plugins/Spam/util/logAndDetectMessageSpam.ts +++ b/backend/src/plugins/Spam/util/logAndDetectMessageSpam.ts @@ -120,8 +120,8 @@ export async function logAndDetectMessageSpam( // Then, if enabled, remove the spam messages if (spamConfig.clean !== false) { msgIds.forEach(id => pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id)); - (pluginData.guild.channels.cache.get(savedMessage.channel_id as Snowflake)! as TextChannel) - .bulkDelete(msgIds as Snowflake[]) + (pluginData.guild.channels.cache.get(savedMessage.channel_id as Snowflake)! as TextChannel | undefined) + ?.bulkDelete(msgIds as Snowflake[]) .catch(noop); } diff --git a/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts b/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts index 0cc579a9..e1fe0aed 100644 --- a/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts +++ b/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts @@ -21,7 +21,7 @@ export function createStarboardEmbedFromMessage( name: `${msg.author.tag}`, }, fields: [], - timestamp: msg.createdAt, + timestamp: msg.createdTimestamp, }; if (color != null) {