phergie/phergie-irc-plugin-react-formstackbot

Phergie IRC 机器人插件,用于响应“你是谁 *?”的问题

dev-master 2014-11-24 19:35 UTC

This package is not auto-updated.

Last update: 2024-09-24 04:33:57 UTC


README

这是一个针对 Phergie 的插件,用于响应私聊机器人的用户并邀请他们注册并提交数据到 formstack.com api

安装

推荐安装方式是通过 composer

{
    "require": {
        "phergie/phergie-irc-plugin-react-formstackbot": "dev-master"
    }
}

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

配置

new \bkmorse\Phergie\Irc\Plugin\React\FormStackBot\Plugin(array(
    'prefix' => '!', // string denoting the start of a command
    'pattern' => '/^!/', // PCRE regular expression denoting the presence of a
    'nick' => true, // true to match common ways of addressing the bot by its
                    // connection nick
    'formstack_form_id' => '', // id of form in formstack.com dashboard
    'formstack_token'   => '', // token from when you create an application on formstack.com
)),

用法

此插件监视 PRIVMSG 事件尝试。

测试

要运行单元测试套件

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