Skip to content

cinchrb/cinch-dice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c3041f8 · Mar 24, 2014

History

4 Commits
Mar 24, 2014
Feb 27, 2012
Feb 27, 2012
Mar 24, 2014

Repository files navigation

Dice plugin

This plugin provides dice for your channel.

Installation

First install the gem by running: [sudo] gem install cinch-dice

Then load it in your bot: require "cinch" require "cinch/plugins/dice"

bot = Cinch::Bot.new do
  configure do |c|
    # add all required options here
    c.plugins.plugins = [Cinch::Plugins::Dice] # optionally add more plugins
  end
end

bot.start

Commands

roll [[<repeats>#]<rolls>]d<sides>[<+/-><offset>]

Examples

roll 5d6 # roll 5 6-sided dice
roll 2#5d6 # roll 5 6-sided dice, twice

Options

:format

With this option you can set the format string used for saying the dice score. The default is "Your dice roll was: %d".

Example configuration

configure do |c|
  c.plugins.options[Cinch::Plugins::Dice][:format] = "Score: %d"
end