Closed jMurad closed 9 months ago
@jMurad messages.StartBot method is equivalent to http://t.me/usernamebot?start=param or ?startgroup=
https://core.telegram.org/method/messages.startBot
it is used to be used by a userbot account to start a bot what you are doing is trying to send that message on same account, not possible
it should be
bot, _ := client.GetSendablePeer("bot username")
chat, _ := ... chatusername// &telegram.InputPeerSelf{}
client.MessagesStartBot(bot, chat, int64(rand.Int(..)), "params")
MessagesStartBot takes as a parameter "bot" type InputUser and GetSendablePeer returns type InputPeer
@jMurad construct it
Result:
Error start bot: sending MessagesStartBot: [BOT_INVALID] This is not a valid bot. (code 400)