Story OrganizationUSER-ONLY
User Walkthrough 36 of 50
Users can organize stories into highlights and albums.
Highlights
addStoryToHighlights and addStoriesToHighlights place stories in highlights. Their removal counterparts are removeStoryFromHighlights and removeStoriesFromHighlights.
await client.addStoryToHighlights(chatId, storyId);
await client.addStoriesToHighlights(chatId, storyIds);
await client.removeStoryFromHighlights(chatId, storyId);
await client.removeStoriesFromHighlights(chatId, storyIds);
Albums
createStoryAlbum creates an album, and setStoryAlbumName renames it.
const album = await client.createStoryAlbum(chatId, "Travel", storyIds);
await client.setStoryAlbumName(chatId, album.id, "Trips");
addStoryToAlbum and addStoriesToAlbum add stories; removeStoryFromAlbum and removeStoriesFromAlbum remove them.
await client.addStoryToAlbum(chatId, album.id, storyId);
await client.addStoriesToAlbum(chatId, album.id, storyIds);
await client.removeStoryFromAlbum(chatId, album.id, storyId);
await client.removeStoriesFromAlbum(chatId, album.id, storyIds);
getStoryAlbums lists albums, while getStoriesInAlbum lists their stories. Reordering is handled by reorderStoriesInAlbum and reorderStoryAlbums.
const albums = await client.getStoryAlbums(chatId);
const stories = await client.getStoriesInAlbum(chatId, album.id);
await client.reorderStoriesInAlbum(chatId, album.id, storyIds);
await client.reorderStoryAlbums(chatId, albums.map(({ id }) => id));
deleteStoryAlbum deletes an album.
await client.deleteStoryAlbum(chatId, album.id);
Listing and Moderation
getStories retrieves stories by identifier, while deleteStories deletes several at once.
const stories = await client.getStories(chatId, storyIds);
await client.deleteStories(chatId, storyIds);
reportStory reports one story; reportStories handles several.
await client.reportStory(chatId, storyId);
await client.reportStories(chatId, storyIds);