forked from cosmic/scythe
uptime part 2
This commit is contained in:
parent
c27012da7d
commit
92e43777fc
|
|
@ -2,6 +2,7 @@ import { Client, Discord, On, type ArgsOf } from "discordx";
|
||||||
import { underageCheck } from "../utils/underage";
|
import { underageCheck } from "../utils/underage";
|
||||||
import { bumpRemind } from "../utils/bump";
|
import { bumpRemind } from "../utils/bump";
|
||||||
import {stat, mkdir} from "fs/promises";
|
import {stat, mkdir} from "fs/promises";
|
||||||
|
import { uptimeLoop } from "../utils/uptime-loop";
|
||||||
|
|
||||||
@Discord()
|
@Discord()
|
||||||
export class Ready {
|
export class Ready {
|
||||||
|
|
@ -21,5 +22,6 @@ export class Ready {
|
||||||
underageCheck(members);
|
underageCheck(members);
|
||||||
}
|
}
|
||||||
bumpRemind(client);
|
bumpRemind(client);
|
||||||
|
uptimeLoop(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export const uptimeLoop = async (client: Client) => {
|
||||||
) as TextChannel;
|
) as TextChannel;
|
||||||
const msg = await channel.messages.fetch(Bun.env.UPTIME_MESSAGE);
|
const msg = await channel.messages.fetch(Bun.env.UPTIME_MESSAGE);
|
||||||
await msg.edit(
|
await msg.edit(
|
||||||
`bot is up, last ping: <t:${Date.now()}:f> | if the ping was more than 1 minute ago, cosmic needs to check the bot lol :3`,
|
`bot is up, last ping: <t:${Math.floor(Date.now()/1000)}:f> | if the ping was more than 1 minute ago, cosmic needs to check the bot lol :3`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue