forked from cosmic/scythe
Compare commits
2 Commits
8c5edab208
...
924939ceeb
| Author | SHA1 | Date |
|---|---|---|
|
|
924939ceeb | |
|
|
0fe1732cb7 |
|
|
@ -15,7 +15,7 @@ export class Ready {
|
||||||
if(!((await stat("data")).isDirectory())) {
|
if(!((await stat("data")).isDirectory())) {
|
||||||
await mkdir("data")
|
await mkdir("data")
|
||||||
}
|
}
|
||||||
if (!(await Bun.file("data/bump.json").exists())) {
|
if (!(await Bun.file("bump.json").exists())) {
|
||||||
await Bun.write("bump.json", "{}");
|
await Bun.write("bump.json", "{}");
|
||||||
}
|
}
|
||||||
if (members) {
|
if (members) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { sleep } from "./underage";
|
||||||
export const bumpRemind = async (client: Client) => {
|
export const bumpRemind = async (client: Client) => {
|
||||||
while (true) {
|
while (true) {
|
||||||
await sleep(5000);
|
await sleep(5000);
|
||||||
const f = await Bun.file("data/bump.json").text();
|
const f = await Bun.file("bump.json").text();
|
||||||
const data = JSON.parse(f);
|
const data = JSON.parse(f);
|
||||||
if (data["bump"]) {
|
if (data["bump"]) {
|
||||||
if (Date.now() - data["bump"] >= 60 * 120 * 1000) {
|
if (Date.now() - data["bump"] >= 60 * 120 * 1000) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue