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
|
||||
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'))
|
||||
|
Loading…
Reference in New Issue
Block a user