MessageLatency: fix bot check (#3523)

This commit is contained in:
u32 2025-09-05 03:04:08 +01:00 committed by GitHub
parent e857f6806f
commit 26074b7f18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ export default definePlugin({
if (!isNonNullish(nonce)) return null; if (!isNonNullish(nonce)) return null;
// Bots basically never send a nonce, and if someone does do it then it's usually not a snowflake // Bots basically never send a nonce, and if someone does do it then it's usually not a snowflake
if (message.bot) return null; if (message.author.bot) return null;
let isDiscordKotlin = false; let isDiscordKotlin = false;
let delta = SnowflakeUtils.extractTimestamp(id) - SnowflakeUtils.extractTimestamp(nonce); // milliseconds let delta = SnowflakeUtils.extractTimestamp(id) - SnowflakeUtils.extractTimestamp(nonce); // milliseconds