Use snowflake timestamp for unknown cache messages

This commit is contained in:
Noikoio 2019-12-12 23:07:35 -08:00
parent 301afe2c8d
commit 75b0a7ce50

View file

@ -121,7 +121,8 @@ namespace Noikoio.RegexBot.Module.ModLogs
{
msgAuthorId = 0;
msgContent = "*(Message not in cache.)*";
msgCreateTime = DateTimeOffset.UtcNow;
// Get timestamp from snowflake
msgCreateTime = DateTimeOffset.FromUnixTimeMilliseconds((long)(messageId >> 22) + 1420070400000);
msgEditTime = null;
}
}