Skip to content
Phergie plugin for provides randomly generated numbers in response to dice rolling requests (https://github.com/phergie/phergie-irc-bot-react)
PHP JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.codeclimate.yml
.dunitconfig
.gitattributes
.gitignore
.scrutinizer.yml
.travis.yml
CONTRIBUTING.md
Gruntfile.js
LICENSE
README.md
composer.json
package.json
phpunit.xml

README.md

Dice rolling plugin for Phergie

Phergie plugin for returning randomly generated numbers in response to dice rolling requests.

Build Status Test Coverage Code Climate Buy me a beer

About

This plugin returns the total of a user specified number of dice rolls.

By default, the plugin responds to "dice " (number of sides is optional, defaults to 6); i.e. dice 5 returns the total of five 6-sided die rolls.

Install

The recommended method of installation is through composer.

composer require chrismou/phergie-irc-plugin-react-dice

See Phergie documentation for more information on installing and enabling plugins.

Configuration

To activate the plugin using the default settings, add the following to your phergie config:

new \Chrismou\Phergie\Plugin\Dice\Plugin

You can configure some of the settings as follows:

new \Chrismou\Phergie\Plugin\Dice\Plugin(
    "defaultSides": 6,      // The number of sides on the dice if excluded from the command
    "maxRolls": 50,         // Maximum number of dice
    "maxSides": 1000,       // Maximum number of sides per dice
    "showSums": true        // Show the sums in the response
)

Tests

To run the unit test suite:

curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit

License

Released under the BSD License. See LICENSE.

You can’t perform that action at this time.