Compare commits

..

2 Commits

Author SHA1 Message Date
b24afe7b80
give coin with react 2022-11-07 15:20:44 +03:00
899a496f14 Merge pull request 'sync w/main' (#1) from mud/bankerbot-rb:main into main
Reviewed-on: #1
2022-11-07 11:56:05 +00:00

19
coin.rb
View File

@ -3,17 +3,12 @@ require 'yaml'
require 'discordrb'
MAX_COINS_PER_DAY = 4
MAX_COINS_PER_DAY = 3
COIN_TIMEOUT = 15
SCOREBOARD = './scoreboard.yml'
<<<<<<< HEAD
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 = 521596582962003968
DUMBASS_BOT = 1034966228755820575
COIN_EMOJI = '🪙'
>>>>>>> b24afe7 (give coin with react)
coin_state_active = false
coins_offered_today = 0
@ -97,13 +92,11 @@ bot.message(with_text: '/coins') do |event|
event.respond "#{clean_name event.author.display_name}, you have #{plural('coin', coins)}!"
end
bot.message(with_text: '!leave') do |event|
event.respond PASTA
end
bot.message(from: DUMBASS_BOT) do |event|
next unless event.message.content.scan(/(?=no swearing)/).count > 0
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
bot.reaction_add do |event|
@ -139,7 +132,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(5, 11))
sleep(get_random_hours(0, 11))
coins_offered_today = 0
end
end