Use snowflake timestamp for unknown cache messages
This commit is contained in:
parent
301afe2c8d
commit
75b0a7ce50
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ namespace Noikoio.RegexBot.Module.ModLogs
|
||||||
{
|
{
|
||||||
msgAuthorId = 0;
|
msgAuthorId = 0;
|
||||||
msgContent = "*(Message not in cache.)*";
|
msgContent = "*(Message not in cache.)*";
|
||||||
msgCreateTime = DateTimeOffset.UtcNow;
|
// Get timestamp from snowflake
|
||||||
|
msgCreateTime = DateTimeOffset.FromUnixTimeMilliseconds((long)(messageId >> 22) + 1420070400000);
|
||||||
msgEditTime = null;
|
msgEditTime = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue