Available methods

deleteStory()

Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
story_idnumberrequiredUnique identifier of the story to delete

returns

boolean

usage in yaebal

deleteStory is directly typed on Api — call it straight off bot.api.

bot.ts
import type { DeleteStoryParams } from "@yaebal/types";

await bot.api.deleteStory({
  business_connection_id: "...",
  story_id: 1,
} satisfies DeleteStoryParams);

context shortcut

also available as ctx.deleteStory() on 4 context types — see @yaebal/contexts.

context shortcut
/** Deletes a story previously posted by the bot on behalf of a managed business account. Requires the *can\_manage\_stories* business bot right. Returns *True* on success. */
ctx.deleteStory(params: Omit<DeleteStoryParams, "business_connection_id"> & { business_connection_id?: string })