Skip to main content

bots.allowSendMessage

Allow the specified bot to send us messages

func (c *Client) BotsAllowSendMessage(ctx context.Context, bot InputUserClass) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.BotsAllowSendMessage(ctx, bot)
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
BotInputUserClassyesThe bot

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References