Skip to content

Commit

Permalink
Join methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ysakasin committed Jun 21, 2020
1 parent 149c9d6 commit 0e5887e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/dice/RerollDice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ def initialize(bcdice, diceBot)
end

def rollDice(string)
output = rollDiceCatched(string)

return "#{@nick_e}: #{output}"
end

def rollDiceCatched(string)
unless parse(string)
return '1'
return nil
end

unless @reroll_threshold
Expand Down Expand Up @@ -73,7 +67,7 @@ def rollDiceCatched(string)
trim_prefix(" > ", grich_text),
].compact

return sequence.join("")
return "#{@nick_e}: #{sequence.join('')}"
end

private
Expand Down Expand Up @@ -149,7 +143,7 @@ def expr()
end

def msg_invalid_reroll_number(command)
"#{command} > 条件が間違っています。2R6>=5 あるいは 2R6[5] のように振り足し目標値を指定してください。"
"#{@nick_e}: #{command} > 条件が間違っています。2R6>=5 あるいは 2R6[5] のように振り足し目標値を指定してください。"
end

# @param sides [Integer]
Expand Down

0 comments on commit 0e5887e

Please sign in to comment.