Skip to content

Commit 46ab1ff

Browse files
authored
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 ```
1 parent 2414620 commit 46ab1ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ b.Handle(tb.OnQuery, func(q *tb.Query) {
401401
}
402402

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

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

0 commit comments

Comments
 (0)