Get Stories (#3294)

* Get all broadcast

* fixed return msgs

* feat: add usage example

* Update src/structures/Broadcast.js

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
tofers 2024-09-30 20:33:31 +03:00 • committed by GitHub
commit 5b0e139ad4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 125 additions and 2 deletions

View file

@ -465,6 +465,11 @@ client.on('message', async msg => {
// const isSynced = await chat.syncHistory();
await msg.reply(isSynced ? 'Historical chat is syncing..' : 'There is no historical chat to sync.');
} else if (msg.body === '!statuses') {
const statuses = await client.getBroadcasts();
console.log(statuses);
const chat = await statuses[0]?.getChat(); // Get user chat of a first status
console.log(chat);
}
});