Update the When To Kick time to match the cron time
This commit is contained in:
parent
784eb5e6c5
commit
e8de5e9931
1 changed files with 6 additions and 1 deletions
|
@ -70,6 +70,11 @@ export default async function AutoKick() {
|
||||||
if (now.getMonth() == whenToNotice.getMonth()
|
if (now.getMonth() == whenToNotice.getMonth()
|
||||||
&& now.getDate() == whenToNotice.getDate()
|
&& now.getDate() == whenToNotice.getDate()
|
||||||
&& now.getHours() == whenToNotice.getHours()) {
|
&& now.getHours() == whenToNotice.getHours()) {
|
||||||
|
|
||||||
|
const nextHour = new Date(whenToNotice);
|
||||||
|
nextHour.setMinutes(0, 0, 0);
|
||||||
|
nextHour.setHours(whenToNotice.getHours() + 1);
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setTitle("Auto Kick Notice")
|
.setTitle("Auto Kick Notice")
|
||||||
.setColor(EmbedColours.Warning)
|
.setColor(EmbedColours.Warning)
|
||||||
|
@ -82,7 +87,7 @@ export default async function AutoKick() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "When To Kick",
|
name: "When To Kick",
|
||||||
value: `<t:${Math.round(whenToKick.getTime() / 1000)}:R>`,
|
value: `<t:${Math.round(nextHour.getTime() / 1000)}:R>`,
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue