Skip to content

Commit

Permalink
Set a unique string ID for each result in inline query Answer
Browse files Browse the repository at this point in the history
It's needed to set a unique string ID for each result in inline query Answer. Otherwise you get an

```
api error: Bad request: RESULT_ID_DUPLICATE
```
  • Loading branch information
dschulz authored Mar 20, 2018
1 parent 2414620 commit 46ab1ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ b.Handle(tb.OnQuery, func(q *tb.Query) {
}

results[i] = result
results[i].SetResultID(strconv.Itoa(i)) // It's needed to set a unique string ID for each result
}

err := b.Answer(q, &tb.QueryResponse{
Expand Down

0 comments on commit 46ab1ff

Please sign in to comment.