forked from mud/bankerbot-rb
Compare commits
1 Commits
702f0ca119
...
899a496f14
Author | SHA1 | Date | |
---|---|---|---|
899a496f14 |
18
coin.rb
18
coin.rb
@ -3,11 +3,11 @@ require 'yaml'
|
|||||||
require 'discordrb'
|
require 'discordrb'
|
||||||
|
|
||||||
|
|
||||||
MAX_COINS_PER_DAY = 4
|
MAX_COINS_PER_DAY = 3
|
||||||
COIN_TIMEOUT = 15
|
COIN_TIMEOUT = 15
|
||||||
SCOREBOARD = './scoreboard.yml'
|
SCOREBOARD = './scoreboard.yml'
|
||||||
|
DUMBASS = 521596582962003968
|
||||||
PASTA='You know what? Im done, i am leaving, we were friendly talking about the subject. This crossed the line of "ok killer of joy" to "no fun allowed"'
|
DUMBASS_BOT = 1034966228755820575
|
||||||
|
|
||||||
coin_state_active = false
|
coin_state_active = false
|
||||||
coins_offered_today = 0
|
coins_offered_today = 0
|
||||||
@ -91,13 +91,11 @@ bot.message(with_text: '/coins') do |event|
|
|||||||
event.respond "#{clean_name event.author.display_name}, you have #{plural('coin', coins)}!"
|
event.respond "#{clean_name event.author.display_name}, you have #{plural('coin', coins)}!"
|
||||||
end
|
end
|
||||||
|
|
||||||
bot.message(with_text: '!leave') do |event|
|
bot.message(from: DUMBASS_BOT) do |event|
|
||||||
event.respond PASTA
|
next unless event.message.content.scan(/(?=no swearing)/).count > 0
|
||||||
end
|
coins = increment_coin(DUMBASS, -1)
|
||||||
|
event.respond "<@#{DUMBASS}>, you have been penalized 1 coin for the grossly negligent behavior of your Intellectual Offspring! You now have #{plural('coin', coins)}."
|
||||||
|
|
||||||
bot.message(with_text: '!cum', in: Integer(ENV['CUM_CHANNEL'])) do |event|
|
|
||||||
next if not ENV['CUM_CHANNEL']
|
|
||||||
event.respond "OHHHHHH IM GONNA CUM"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
bot.run(true)
|
bot.run(true)
|
||||||
@ -114,7 +112,7 @@ loop do
|
|||||||
# if max coins per day has reached, sleep until midnight
|
# if max coins per day has reached, sleep until midnight
|
||||||
if coins_offered_today >= MAX_COINS_PER_DAY
|
if coins_offered_today >= MAX_COINS_PER_DAY
|
||||||
sleep(get_seconds_to_midnight(Time.now))
|
sleep(get_seconds_to_midnight(Time.now))
|
||||||
sleep(get_random_hours(5, 11))
|
sleep(get_random_hours(0, 11))
|
||||||
coins_offered_today = 0
|
coins_offered_today = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user