Git Product home page Git Product logo

botman-driver-line's Introduction

BotMan LINE Driver (under construction)

BotMan driver to connect LINE with BotMan

Build Status codecov StyleCI

Contributing

Please see CONTRIBUTING for details.

License

BotMan is free software distributed under the terms of the MIT license.

botman-driver-line's People

Contributors

gundamew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

botman-driver-line's Issues

How to create button?

I'm trying to create button which usually work across the board.. but how do I create buttons? or Horizontal Carousel? Help?

Get User-Information in a better way...?

Hi.
Great work so far.

It works pretty well. There's one problem. Currently the getUser() function returns an empty user.
If I want to work in Line with Groups where I can have a group-admin (who actually "controls" the bot) it would be great to get the UserId in a better way.
Currently I use (within a $bot->hears):

$payload = collect($bot->getMessage()->getPayload());
$events = current($payload->get('events'));
$userId = $events['source']['userId'];
$eventType = $events['source']['type'];

I've not seen a better solution for now...?

無法用 Composer 安裝

無法用 Composer 安裝,在 Packagist 上找不到這個套件,請問什麼時候會上架?

using driver...

What did I do wrong?
Did not reply and yes I did install the driver and add token. @gundamew maybe can help?

<?php
use App\Http\Controllers\BotManController;
use App\Conversations\TelegramConversation;
use BotMan\BotMan\Middleware\Dialogflow;
use BotMan\Drivers\Telegram\TelegramDriver;
use BotMan\Drivers\Line\LineDriver;
use BotMan\Drivers\Web\WebDriver;

$botman = resolve('botman');

//Checkout incoming messages from Telegram and Web Driver
$botman->group(['driver' => [TelegramDriver::class, WebDriver::class, LineDriver::class]], function($bot) {
    $dialogflow = Dialogflow::create(getenv('DIALOGFLOW_TOKEN'), 'id')->listenForAction();
    $bot->middleware->received($dialogflow);
    $bot->hears('input.welcome', function ($bot) {
    	$bot->reply('Halo, saya Hana, Asisten Virtual dari Halosis.');
        $bot->startConversation(new TelegramConversation());
    })->middleware($dialogflow);
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.