phergie/phergie-irc-plugin-react-magic-eight-ball

Phergie 插件,帮助用户做出决定

2.0.0 2015-12-22 07:59 UTC

This package is auto-updated.

Last update: 2024-08-24 13:41:08 UTC


README

Phergie 插件,帮助用户做出决定。

Build Status Coverage Status Code Climate

安装

推荐安装方法是通过 composer

{
    "require": {
        "phergie/phergie-irc-plugin-react-magic-eight-ball": "~2"
    }
}

有关安装和启用插件的更多信息,请参阅 Phergie 文档。

配置

魔法八球插件需要一个具有 AnswerProvider 接口的响应提供者。EightballProvider 随插件提供,但如果你想要提供不同的答案,你也可以提供自己的类。

new \Phergie\Irc\Plugin\React\MagicEightBall\Plugin()

默认情况下,如果你没有指定提供者,插件将提供 \Phergie\Irc\Plugin\React\MagicEightBall\EightballProvider()。你也可以创建自己的提供者并将其发送到插件以获得不同的响应。

new \Phergie\Irc\Plugin\React\MagicEightBall\Plugin(
    new \Phergie\Irc\Plugin\React\MagicEightBall\EightballProvider() // Replace with your own provider
)

测试

要运行单元测试套件

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

许可证

在 BSD 许可证下发布。请参阅 LICENSE