How to find message's file unique IDs with Telegram bot API?

Viewed 1512

i'm experimenting with Golang Telegram bot APIs and I have a problem with the ID of the message's file that i send to the bot.

I forwarded a message of type VOICE to the bot and in the code I read the unique ID of this file to understand if the bot received that voice message yet (... maybe forwarded by another user).

The problem is that when I read the ID with this code msg.Voice.FileID I get always a different string. But not completely different, the first and last part of the string is always the same, but the middle part changes, like this:

id first time i forward the message: aaaaaa_abc_zzzzz

id second time i forward the message: aaaaaa_def_zzzzz

The doc does not say anything about it... (https://godoc.org/github.com/go-telegram-bot-api/telegram-bot-api)

Do you guys know how to deal with file ids? My goal is to be able to say "ok, I received this photo (or voice, or audio, or video) yet from this or another user"

Thank you for your time

Ve

1 Answers
Related