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
| Name | Type | Required | Description |
|---|---|---|---|
Bot | InputUserClass | yes | The bot |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.canSendMessage#1359f4e6