forked from mud/bankerbot-rb
Merge branch 'main' of git.poto.cafe:mud/bankerbot-rb
This commit is contained in:
commit
dc32fb3dcc
3
coin.rb
3
coin.rb
@ -55,7 +55,7 @@ end
|
||||
bot.message(in: Integer(ENV['BOT_CHANNEL'])) do |event|
|
||||
puts event.message
|
||||
if event.message.attachments.count { |x| x.filename.scan(/coin*/).length > 0 } > 0
|
||||
event.respond "Oh no! Looks like you tried to post a fradulent coin! #{event.author.name}, your coin balance has now been emptied. Let that be a lesson for next time!"
|
||||
event.respond "Oh no! Looks like you tried to post a fradulent coin! #{event.author.display_name}, your coin balance has now been emptied. Let that be a lesson for next time!"
|
||||
empty_coin(event.author.id)
|
||||
end
|
||||
end
|
||||
@ -96,6 +96,7 @@ loop do
|
||||
# if max coins per day has reached, sleep until midnight
|
||||
if coins_offered_today >= MAX_COINS_PER_DAY
|
||||
sleep(get_seconds_to_midnight(Time.now))
|
||||
sleep(get_random_hours(0, 11))
|
||||
coins_offered_today = 0
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user