Compare commits
No commits in common. "main" and "feat/cryptobanky" have entirely different histories.
main
...
feat/crypt
9
coin.rb
9
coin.rb
@ -74,7 +74,7 @@ def get_coin(event, amt = 1)
|
|||||||
# update score
|
# update score
|
||||||
author = event.methods.include?(:author) ? event.author : event.user
|
author = event.methods.include?(:author) ? event.author : event.user
|
||||||
|
|
||||||
if $coin_state_active != 0
|
if $coin_state_active
|
||||||
if author.bot_account?
|
if author.bot_account?
|
||||||
event.respond "Bots don't get coins!"
|
event.respond "Bots don't get coins!"
|
||||||
end
|
end
|
||||||
@ -144,7 +144,7 @@ end
|
|||||||
|
|
||||||
bot.message(with_text: 'boobs', in: Integer(ENV['CUM_CHANNEL'])) do |event|
|
bot.message(with_text: 'boobs', in: Integer(ENV['CUM_CHANNEL'])) do |event|
|
||||||
next if not ENV['CUM_CHANNEL']
|
next if not ENV['CUM_CHANNEL']
|
||||||
event.respond "# OHHHHHH IM GONNA CUM"
|
event.respond "OHHHHHH IM GONNA CUM"
|
||||||
end
|
end
|
||||||
|
|
||||||
bot.reaction_add do |event|
|
bot.reaction_add do |event|
|
||||||
@ -167,7 +167,7 @@ bot.message(in: Integer(ENV['BOT_CHANNEL'])) do |event|
|
|||||||
|
|
||||||
if result == user_result
|
if result == user_result
|
||||||
get_coin(event, MATH_PROBLEM_COIN_GAIN)
|
get_coin(event, MATH_PROBLEM_COIN_GAIN)
|
||||||
elsif user_result.is_a? Integer
|
else
|
||||||
event.respond "Nice try, but you're wrong!"
|
event.respond "Nice try, but you're wrong!"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -188,8 +188,7 @@ loop do
|
|||||||
$mathproblem_operator = rand(2) == 1 ? "+" : "-"
|
$mathproblem_operator = rand(2) == 1 ? "+" : "-"
|
||||||
|
|
||||||
# send the math problem
|
# send the math problem
|
||||||
bot.send_file(ENV['BOT_CHANNEL'], File.open('./block.gif', 'r'))
|
bot.send_message(ENV['BOT_CHANNEL'], "Solve the following for #{MATH_PROBLEM_COIN_GAIN} coins: `#{$mathproblem_op1} #{$mathproblem_operator} #{mathproblem_op2}`")
|
||||||
bot.send_message(ENV['BOT_CHANNEL'], "Solve the following for #{MATH_PROBLEM_COIN_GAIN} coins: `#{$mathproblem_op1} #{$mathproblem_operator} #{$mathproblem_op2}`")
|
|
||||||
else
|
else
|
||||||
# activate coin state
|
# activate coin state
|
||||||
$coin_state_active = COIN_STATE_ACTIVE
|
$coin_state_active = COIN_STATE_ACTIVE
|
||||||
|
Loading…
Reference in New Issue
Block a user