Update: see repo for the scraping code + JSON representation https://github.com/PaulSonOfLars/telegram-bot-api-spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/binary" | |
"fmt" | |
) | |
// hash is the hash at the end of an invite link -> t.me/joinchat/<hash> | |
func unpack_invitehash(hash string) (int, int, error) { | |
fmt.Println("hash:", hash) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/binary" | |
"fmt" | |
"strconv" | |
) | |
func UnpackInlineMessageId(inlineMessageId string) (int64, int64, int64, int64, error) { | |
bs, err := base64.RawURLEncoding.DecodeString(inlineMessageId) |