[ShowHiddenChannels] Fix last message date (#342)

This commit is contained in:
Nico 2022-12-16 15:51:23 +01:00 committed by GitHub
parent 456164253d
commit 3efc79224f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View file

@ -17,7 +17,8 @@
*/
import { mergeDefaults } from "@utils/misc";
import { findByCodeLazy, findByPropsLazy, waitFor } from "@webpack";
import { findByCodeLazy, findByPropsLazy } from "@webpack";
import { SnowflakeUtils } from "@webpack/common";
import { Message } from "discord-types/general";
import type { PartialDeep } from "type-fest";
@ -26,9 +27,6 @@ import { Argument } from "./types";
const createBotMessage = findByCodeLazy('username:"Clyde"');
const MessageSender = findByPropsLazy("receiveMessage");
let SnowflakeUtils: any;
waitFor("fromTimestamp", m => SnowflakeUtils = m);
export function generateId() {
return `-${SnowflakeUtils.fromTimestamp(Date.now())}`;
}