lib/cinch/plugins/dicebag.rb
# Roll a specific set of dice and return the pretty result
# @param [String] nick Nickname of the user rolling.
# @param [String] dice Space delimited string of dice to role.
#   (i.e. '6d12 4d20 d10'
# @return [String] String describing the dice that were rolled
Roll a specific set of dice and return the pretty result
Roll a specific set of dice and return the pretty result
def roll(message, dice = '1d20')
        result = Die.roll(dice.split(' '))
        if result.is_a?(Integer)
          result = "#{message.user.nick} rolls #{dice} totalling #{result}"
        end
        message.reply result
      end
def roll ( message , dice = '1d20' ) result = Die . roll ( dice . split ( ' ' ) ) if result . is_a? ( Integer ) result = "#{message.user.nick} rolls #{dice} totalling #{result}" end message . reply result end
Roll a specific set of dice and return the pretty result
Roll a specific set of dice and return the pretty result
String describing the dice that were rolled
String describing the dice that were rolled
String
message
<not_specific>
dice
<not_specific>
<not_specific>
dice Space delimited string of dice to role. (i.e.
dice Space delimited string of dice to role . ( i . e .