forked from mud/bankerbot-rb
Compare commits
4 Commits
feat/crypt
...
3c3815defb
Author | SHA1 | Date | |
---|---|---|---|
3c3815defb | |||
06d44e564f
|
|||
caaf419d6d
|
|||
d548e00fb3 |
5
coin.rb
5
coin.rb
@ -74,7 +74,7 @@ def get_coin(event, amt = 1)
|
||||
# update score
|
||||
author = event.methods.include?(:author) ? event.author : event.user
|
||||
|
||||
if $coin_state_active
|
||||
if $coin_state_active != 0
|
||||
if author.bot_account?
|
||||
event.respond "Bots don't get coins!"
|
||||
end
|
||||
@ -188,7 +188,8 @@ loop do
|
||||
$mathproblem_operator = rand(2) == 1 ? "+" : "-"
|
||||
|
||||
# send the math problem
|
||||
bot.send_message(ENV['BOT_CHANNEL'], "Solve the following for #{MATH_PROBLEM_COIN_GAIN} coins: `#{$mathproblem_op1} #{$mathproblem_operator} #{mathproblem_op2}`")
|
||||
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}`")
|
||||
else
|
||||
# activate coin state
|
||||
$coin_state_active = COIN_STATE_ACTIVE
|
||||
|
Reference in New Issue
Block a user