Skip to content

Commit 8ef758b

Browse files
committed
Limit running to mondays
1 parent cbcdb2e commit 8ef758b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

count-messages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ const GUILD_ID = `440163731704643589`;
1919
const personalToken = getConfig('PERSONAL_TOKEN');
2020

2121
async function init() {
22+
// Monday
23+
if (new Date().getDay() !== 1) {
24+
console.log('Not Monday – nothing to do here!');
25+
process.exit(0);
26+
}
27+
2228
const intents = new Intents([
2329
Intents.NON_PRIVILEGED, // include all non-privileged intents, would be better to specify which ones you actually need
2430
'GUILD_MEMBERS', // lets you request guild members (i.e. fixes the issue)

0 commit comments

Comments
 (0)