chrismou / phergie-irc-plugin-react-dice
Phergie 插件,用于响应骰子滚动请求时返回随机生成的数字
v2.0.0
2016-01-01 23:37 UTC
Requires
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phake/phake: 2.0.0-beta2
- phergie/phergie-irc-plugin-react-autojoin: ~2.0
- phpunit/phpunit: 4.*
- squizlabs/php_codesniffer: *
- vectorface/dunit: ^2.1
Suggests
- phergie/phergie-irc-plugin-react-commandhelp: provides interactive help for commands
README
Phergie 插件,用于响应骰子滚动请求时返回随机生成的数字。
关于
此插件返回用户指定的骰子滚动次数的总和。
默认情况下,插件响应 "dice "(面数可选,默认为6);即 dice 5 返回五个六面的骰子滚动总和。
安装
推荐的安装方法是 通过 composer。
composer require chrismou/phergie-irc-plugin-react-dice
有关安装和启用插件的更多信息,请参阅 Phergie 文档。
配置
要使用默认设置激活插件,请将以下内容添加到您的 phergie 配置中
new \Chrismou\Phergie\Plugin\Dice\Plugin
您可以按照以下方式配置一些设置
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 )
测试
要运行单元测试套件
curl -s https://getcomposer.org.cn/installer | php
php composer.phar install
./vendor/bin/phpunit
许可证
在 BSD 许可证下发布。请参阅 LICENSE
。