add steve target check
This commit is contained in:
parent
ca11dbbdd4
commit
d558042f64
5
main.rb
5
main.rb
@ -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'))
|
||||||
|
Loading…
Reference in New Issue
Block a user