telegram-bot-api
telegram-bot-api copied to clipboard
Sending message with method createChatInviteLink return nothing
Response from telegram
{"invite_link":"https://t.me/+SEgfYrEGlSwzMjAy", "creator":{"id":1295847044,"is_bot":true,"first_name":"***","username":"*"},"member_limit":1,"creates_join_request":false,"is_primary":false,"is_revoked":false}
After Unmarshal, message has not inviteLink
Hi! You must provide youre code first, if you want help
But it looks like that youre use it wrong way
You must use Request method and provide tgbotapi.CreateChatInviteLinkConfig for it
Hi, that's exactly what I did.

But I want to use the Send method to create a link and return a Message, where the ChatInviteLink field will be
Works for me like so:
response, err := bot.Request(createInviteLinkConfig)
if err != nil {
return msg, err
}
var dat map[string]interface{}
json.Unmarshal(response.Result, &dat)