Project

cinch-dice

0.0
No commit activity in last 3 years
No release in over 3 years
Dice plugin, perfect for role-playing games or generic decision making.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0
 Project Readme

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