add steve target check

This commit is contained in:
stryan 2022-02-07 10:37:01 -05:00
parent ca11dbbdd4
commit d558042f64

View File

@ -100,7 +100,6 @@ loop do
sleep timer sleep timer
t = Time.new t = Time.new
if t.hour < 9 and t.hour > 2 if t.hour < 9 and t.hour > 2
puts t.hour
logger.info("skipping send cuz it's late") logger.info("skipping send cuz it's late")
next next
end end
@ -110,6 +109,10 @@ loop do
next next
end end
steve = bot.users[sid] 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}") logger.info("sending submission #{msg.id}")
if msg.local if msg.local
steve.send_file(File.open(msg.content,'r')) steve.send_file(File.open(msg.content,'r'))