diff --git a/main.rb b/main.rb index a19be3a..3fe6926 100755 --- a/main.rb +++ b/main.rb @@ -100,7 +100,6 @@ loop do sleep timer t = Time.new if t.hour < 9 and t.hour > 2 - puts t.hour logger.info("skipping send cuz it's late") next end @@ -110,6 +109,10 @@ loop do next end steve = bot.users[sid] + if steve == nil + logger.warn("Tried to get Steve #{sid} but failed, skipping") + next + end logger.info("sending submission #{msg.id}") if msg.local steve.send_file(File.open(msg.content,'r'))