lib/cinch/plugins/dicebag.rb
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
# @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
dice
dice Space delimited string of dice to role. (i.e.
dice Space delimited string of dice to role . ( i . e .