Set a unique string ID for each result in inline query Answer

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
```
pull/128/head
Diego Schulz 6 years ago committed by GitHub
parent 2414620038
commit 46ab1ff3d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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{

Loading…
Cancel
Save