approveSuggestedPost()
Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | required | Unique identifier for the target direct messages chat |
message_id | number | required | Identifier of a suggested post message to approve |
send_date | number | optional | Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future. |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { ApproveSuggestedPostParams } from "@yaebal/types";
await bot.api.call<boolean>("approveSuggestedPost", {
chat_id: 123456789,
message_id: 1,
} satisfies ApproveSuggestedPostParams);context shortcut
also available as ctx.approveSuggestedPost() on
10
context types — see @yaebal/contexts.
/** Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns *True* on success. */
ctx.approveSuggestedPost(params: Omit<ApproveSuggestedPostParams, "chat_id" | "message_id">)official Bot API docs: https://core.telegram.org/bots/api/#approvesuggestedpost