feat: bump reminder
This commit is contained in:
parent
33c79b8109
commit
d5b0b17432
|
|
@ -1,5 +1,6 @@
|
||||||
import { Discord, On, type ArgsOf } from "discordx";
|
import { Discord, On, type ArgsOf } from "discordx";
|
||||||
import { snipeObject } from "..";
|
import { snipeObject } from "..";
|
||||||
|
import { sleep } from "../utils/underage";
|
||||||
|
|
||||||
@Discord()
|
@Discord()
|
||||||
export class MessageEvents {
|
export class MessageEvents {
|
||||||
|
|
@ -8,4 +9,19 @@ export class MessageEvents {
|
||||||
snipeObject.author = msg.author?.username ?? "unknown";
|
snipeObject.author = msg.author?.username ?? "unknown";
|
||||||
snipeObject.content = msg.content;
|
snipeObject.content = msg.content;
|
||||||
}
|
}
|
||||||
|
@On({ event: "messageCreate" })
|
||||||
|
async messageCreate([msg]: ArgsOf<"messageCreate">) {
|
||||||
|
if (msg.embeds.length > 0) {
|
||||||
|
if (
|
||||||
|
msg.author.id == "302050872383242240" &&
|
||||||
|
msg.embeds[0].description?.includes("Bump done! :thumbsup:")
|
||||||
|
) {
|
||||||
|
await msg.channel.send(
|
||||||
|
"thanks for bumping <3 I'll send a reminder in 2 hours :3",
|
||||||
|
);
|
||||||
|
await sleep(1000 * 60 * 120);
|
||||||
|
await msg.channel.send("it's time to bump again!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue