Arman92 / go-tdlib

Golang Telegram TdLib JSON bindings
GNU General Public License v3.0
436 stars 100 forks source link

"pinChatMessage": Not enough rights to pin a message #19

Closed leonmak closed 5 years ago

leonmak commented 5 years ago

I'm stuck at trying to pin a message that I sent to a supergroup: I got Not enough rights to pin a message when I call

    result, err := client.SendAndCatch(tdlib.UpdateData{
        "@type":                "pinChatMessage",
        "chat_id":              newChat.ID,
        "message_id":           msgID,
        "disable_notification": false,
    })

I tried the supergroupID but the error was error! code: %!d(float64=6) msg: Message can't be pinned

I had tried the client method client.PinSupergroupMessage(mySuperGroup.SupergroupID, msgID, true) which is of @type pinSupergroupMessage but it timed out

Arman92 commented 5 years ago

Sorry for super late reply, are you sure you can pin it by the same account on a Telegram client?

Arman92 commented 5 years ago

Can you give some updates on this issue?

leonmak commented 5 years ago

I don't recall since it's quite some time, but I think the bot has to be an admin