tgbot-cpp icon indicating copy to clipboard operation
tgbot-cpp copied to clipboard

std::string TgBot::Chat::inviteLink is empty

Open ghost opened this issue 5 years ago • 1 comments

Hello,

I try to get the invite link of a public group but inviteLink is empty.

According to documentation:

Optional. Chat invite link, for supergroups and channel chats. Returned only in getChat.

Then I use getChat to get the invite link.

Bot bot(token);
std::String inviteLink = bot.getApi().getChat(message->chat->id)->inviteLink;

but inviteLink is an empty string. How do I can get the invite link? Is this the right method?

Thanks!

ghost avatar Dec 31 '19 10:12 ghost

I rather think that this is due to the Telegram servers. I tried it once too with my own API and the same result as you experience.

Spixmaster avatar Jan 28 '20 17:01 Spixmaster