LoginSignup
2
1

More than 5 years have passed since last update.

LINE Botは人が多いと誰が喋ってるのか認識できない

Posted at

LINE Messaging API の仕様

だれかが喋ったときにBotが受け取るデータの例。

{
  "events": [
    {
      "replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
      "type": "message",
      "timestamp": 1462629479859,
      "source": {
        "type": "user",
        "userId": "U206d25c2ea6bd87c17655609a1c37cb8"
      },
      "message": {
        "id": "325708",
        "type": "text",
        "text": "Hello, world"
      }
    }
  ]
}

ユーザとBotが1対1のとき

image

source.type="user"で来て、誰が喋ったのかはuserIdでわかる。

グループ内での会話のとき

image

source.type="group"で来て、どこのグループなのかはgroupIdでわかる。

しかし、userIdの情報が無いので誰が喋ってるのかわからない。

3人以上の会話=ルームのとき

image

source.type="room"で来て、どこのルームなのかはroomIdでわかる。

しかし、userIdの情報が無いので誰が喋ってるのかわからない。

盛り上げたいんだかやる気ないのかよくわからない。

どうしてこうなったてかんじ。
あと、https必須のWebHookの敷居の高さのせいで足切りされている開発者がたくさんいると思います。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1