3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +00:00
zeppelin/backend/src/utils/idToTimestamp.ts

7 lines
208 B
TypeScript
Raw Normal View History

2021-07-29 13:14:45 +01:00
import { Snowflake, SnowflakeUtil } from "discord.js";
export function idToTimestamp(id: string) {
if (typeof id === "number") return null;
2021-07-29 13:14:45 +01:00
return SnowflakeUtil.deconstruct(id as Snowflake).timestamp;
}