Skip to content

Commit 08c970d

Browse files
committed
One more task to send a daily puzzle manually if needed
We have seen this situation when we have no more approved puzzles and we need to run this command manually. So this would enable us to do something like this: ``` heroku run rake discord:new_puzzle ``` It would save us a couple of steps if we need to manually send out a puzzle to Discord servers...
1 parent 810be5b commit 08c970d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/tasks/discord.rake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ namespace :discord do
44
bot.run
55
end
66

7+
desc "Sends a daily puzzle. Useful for days when the approved puzzles where at 0 when the cron job ran."
8+
task new_puzzle: :environment do
9+
DailyPuzzleJob.perform_now
10+
end
11+
712
desc "Clear all globally registered bot commands and re-register them"
813
task reset_commands: :environment do
914
# Fetch and delete all existing commands

0 commit comments

Comments
 (0)