use optional chaining and createdTimestamp on embed
This commit is contained in:
parent
87cc461c79
commit
3a59f772ae
2 changed files with 3 additions and 3 deletions
|
@ -120,8 +120,8 @@ export async function logAndDetectMessageSpam(
|
||||||
// Then, if enabled, remove the spam messages
|
// Then, if enabled, remove the spam messages
|
||||||
if (spamConfig.clean !== false) {
|
if (spamConfig.clean !== false) {
|
||||||
msgIds.forEach(id => pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id));
|
msgIds.forEach(id => pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id));
|
||||||
(pluginData.guild.channels.cache.get(savedMessage.channel_id as Snowflake)! as TextChannel)
|
(pluginData.guild.channels.cache.get(savedMessage.channel_id as Snowflake)! as TextChannel | undefined)
|
||||||
.bulkDelete(msgIds as Snowflake[])
|
?.bulkDelete(msgIds as Snowflake[])
|
||||||
.catch(noop);
|
.catch(noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ export function createStarboardEmbedFromMessage(
|
||||||
name: `${msg.author.tag}`,
|
name: `${msg.author.tag}`,
|
||||||
},
|
},
|
||||||
fields: [],
|
fields: [],
|
||||||
timestamp: msg.createdAt,
|
timestamp: msg.createdTimestamp,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (color != null) {
|
if (color != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue