forked from mud/bankerbot-rb
Compare commits
12 Commits
feat/fuck-
...
702f0ca119
Author | SHA1 | Date | |
---|---|---|---|
702f0ca119 | |||
29bca2cafc | |||
f188c90284 | |||
ccc19b384e | |||
5e98f7353b | |||
6e492fc296 | |||
0c94e60258 | |||
cc0c60a82b | |||
66e6c3f688 | |||
d61f9543fb
|
|||
a9a313aa02 | |||
56f54bed6a |
18
coin.rb
18
coin.rb
@ -3,9 +3,12 @@ require 'yaml'
|
||||
require 'discordrb'
|
||||
|
||||
|
||||
MAX_COINS_PER_DAY = 3
|
||||
MAX_COINS_PER_DAY = 4
|
||||
COIN_TIMEOUT = 15
|
||||
SCOREBOARD = './scoreboard.yml'
|
||||
|
||||
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"'
|
||||
|
||||
coin_state_active = false
|
||||
coins_offered_today = 0
|
||||
|
||||
@ -57,7 +60,6 @@ def clean_name(input)
|
||||
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! #{clean_name event.author.display_name}, your coin balance has now been emptied. Let that be a lesson for next time!"
|
||||
empty_coin(event.author.id)
|
||||
@ -65,7 +67,6 @@ bot.message(in: Integer(ENV['BOT_CHANNEL'])) do |event|
|
||||
end
|
||||
|
||||
bot.message(content: 'GET COIN' ) do |event|
|
||||
next if event.author.role? 'robot friend'
|
||||
# update score
|
||||
if coin_state_active
|
||||
if event.author.bot_account?
|
||||
@ -90,6 +91,15 @@ 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(with_text: '!cum', in: Integer(ENV['CUM_CHANNEL'])) do |event|
|
||||
next if not ENV['CUM_CHANNEL']
|
||||
event.respond "OHHHHHH IM GONNA CUM"
|
||||
end
|
||||
|
||||
bot.run(true)
|
||||
|
||||
loop do
|
||||
@ -104,7 +114,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))
|
||||
sleep(get_random_hours(5, 11))
|
||||
coins_offered_today = 0
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user