aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app.js b/app.js
index 2b2c5ea..05d732c 100644
--- a/app.js
+++ b/app.js
@@ -21,9 +21,19 @@ client.on('ready', () => {
Object.keys(jobs).forEach((job) => {
job_crons[job] = cron.schedule(jobs[job].crontab, () => {
client.channels.cache.get(jobs[job].channel_id).send(jobs[job].message);
+ }, {
+ scheduled: true,
+ timezone: process.env.TIMEZONE
});
});
});
+ client.user.setPresence({
+ activities: [{
+ name: 'sily'
+ type: ActivityType.Playing,
+ }],
+ status: "idle"
+ });
});
client.login(process.env.DISCORD_TOKEN);
@@ -57,6 +67,9 @@ app.post('/', verifyKeyMiddleware(process.env.PUBLIC_KEY), async function (req,
};
job_crons[id] = cron.schedule(crontab, () => {
client.channels.cache.get(req.body.channel_id).send(message);
+ }, {
+ scheduled: true,
+ timezone: process.env.TIMEZONE
});
const json = JSON.stringify(jobs);