Skip to content

Commit

Permalink
Ping schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixLusseau authored Aug 10, 2024
1 parent 2b90f62 commit 3097dbd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
- `/fftag` : Shows the information of a not registered clan

- Scheduled war report has been added to the bot ! It will be sent every day from friday to monday at the reset hour in the clan war channel.
- Scheduled `/ffrace` and `/ffattacks` with ping has been added to the bot ! It will be sent every day from friday to monday at 01h00 and from Thurday to Sunday at 21h00 and 23h00 in the clan war channels.
- Scheduled `/ffrace` and `/ffattacks` with ping has been added to the bot ! It will be sent every day from friday to monday at 09h00 and from Thurday to Sunday at 21h00 in the clan war channels.

- Responds a link to the RoyaleAPI player profile when a player tag is sent in a room where the bot is present.
Sends a screenshot of the player war history and the graph associated.
Expand Down
14 changes: 9 additions & 5 deletions utils/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,22 @@ function schedule(bot, value, tag, guildID, chanID) {
reports.report(bot, api, null, null, channel, tag, guildID)
});
// Schedule ffrace and ffattacks with ping at 01h00, 21h00 and 23h00 on the war days
cron.schedule('0 1 * * 5,6,7,1', () => {
// cron.schedule('0 1 * * 5,6,7,1', () => {
// ffrace.ffrace(bot, api, null, channel, tag, false)
// ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
// });
cron.schedule('0 9 * * 5,6,7,1', () => {
ffrace.ffrace(bot, api, null, channel, tag, false)
ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
});
cron.schedule('0 21 * * 4,5,6,7', () => {
ffrace.ffrace(bot, api, null, channel, tag, false)
ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
});
cron.schedule('0 23 * * 4,5,6,7', () => {
ffrace.ffrace(bot, api, null, channel, tag, false)
ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
});
// cron.schedule('0 23 * * 4,5,6,7', () => {
// ffrace.ffrace(bot, api, null, channel, tag, false)
// ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
// });
// console.log('Scheduled ' + key + ' for ' + value.substring(3, 5) + ' ' + value.substring(0, 2) + ' * * 5,6,7,1')

cron.schedule('55 20 * * 4,5,6,7', () => { // Refresh the guild members list at 20h55 on war days
Expand Down

0 comments on commit 3097dbd

Please sign in to comment.