示例#1
0
function processMessage(Message $message)
{
    // reply to user message
    $opt = new SendOptions();
    $opt->replyTo($message);
    // reply after 60 seconds
    timed_task(60 * 1000, array('uid' => $message->senderID(), 'message' => '[Hello, ' . $message->text() . ']', 'opt' => $opt->json()));
}
示例#2
0
function send_message($uid, $msg, SendOptions $options = null)
{
    if ($options == null) {
        $options = new SendOptions();
    }
    raw_send_message($uid, $msg, $options->json());
}