mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Make message with default buttons stateful
This commit is contained in:
parent
5efdf5ce95
commit
5c7c3c8cba
10 changed files with 158 additions and 47 deletions
10
backend/src/utils/idToTimestamp.ts
Normal file
10
backend/src/utils/idToTimestamp.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
import moment from "moment";
|
||||
|
||||
const EPOCH = 1420070400000;
|
||||
|
||||
export function idToTimestamp(id: string) {
|
||||
if (typeof id === "number") return null;
|
||||
return moment(+id / 4194304 + EPOCH)
|
||||
.utc()
|
||||
.valueOf();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue