Skip to main content

bots.canSendMessage

Check whether the specified bot can send us messages

func (c *Client) BotsCanSendMessage(ctx context.Context, bot InputUserClass) (bool, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
BotInputUserClassyesThe bot

Returns

bool

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References