Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Table of Contents
- Description
- Usage Example
- I Want to Test this PR
- I Got an Error While Testing This PR ❌
- How Has the PR Been Tested (latest test on 04.05.2024)
- Types of Changes
Description
The PR adds
Client.getPinnedMessages
andChat.getPinnedMessages
methods to retrieve all pinned messages from a chat or a group by providing the chat ID.Methods return an array of
Message
instances, or an empty array if there are no pinned messages in a chat/group.Usage Example
To test this PR by yourself you should do two steps:
1. Install the PR by running one of the following commands:
2. Lock your WWeb version on 2.2412.54:
If you encounter any errors while testing this PR, please provide in a comment:
console.log(await client.getWWebVersion());
Important
You have to reapply the PR each time it is changed (new commits were pushed since your last application)
How Has The PR Been Tested (latest test on 04.05.2024)
Tested with a code provided in usage example.
Tested On:
Types of accounts:
Environment:
Types of Changes
Checklist