Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Restart every 10 hours because discord is literally cancer
Browse files Browse the repository at this point in the history
  • Loading branch information
Chew committed Feb 10, 2019
1 parent 82884e2 commit cedf735
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/hq.rb
Expand Up @@ -33,6 +33,12 @@ def loadpls
end
end

Scheduler.in '10h' do
puts "Restarting the bot..."
sleep 1
exec("ruby run.rb")
end

loadpls

Bots.each do |bot|
Expand Down
1 change: 1 addition & 0 deletions run.rb
Expand Up @@ -5,6 +5,7 @@
require 'open-uri'
require 'dblruby'
require 'mysql2'
require 'rufus-scheduler'
puts 'All dependencies loaded'

CONFIG = YAML.load_file('config.yaml')
Expand Down

0 comments on commit cedf735

Please sign in to comment.