Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: polls overhaul #10328

Merged
merged 52 commits into from
Feb 15, 2025
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e5a5966
feat(Managers): add PollAnswerVoterManager
uhKevinMC Jun 6, 2024
ea2cb46
feat(Partials): make Polls partial-safe
uhKevinMC Jun 6, 2024
9370828
types: add typings
uhKevinMC Jun 6, 2024
f311a41
chore: add tests
uhKevinMC Jun 6, 2024
e33342c
fix: use fetch method in manager instead
uhKevinMC Jun 6, 2024
c4c7806
chore: add tests for manager
uhKevinMC Jun 6, 2024
068d17a
feat: add partial support to poll actions
uhKevinMC Jun 8, 2024
ed3104a
style: formatting
uhKevinMC Jun 8, 2024
648f767
Merge branch 'discordjs:main' into main
uhKevinMC Jun 8, 2024
6db874e
fix: change all .users references to .voters
uhKevinMC Jun 9, 2024
43930c1
refactor: add additional logic for partials
uhKevinMC Jun 9, 2024
01fca07
fix: actually add the partials
uhKevinMC Jun 9, 2024
08061e6
fix: fixed issue where event does not emit on first event
uhKevinMC Jun 9, 2024
056fb3c
fix: align property type with DAPI documentation
uhKevinMC Jun 9, 2024
7113c56
fix: resolve additional bugs with partials
uhKevinMC Jun 9, 2024
c1c848a
typings: update typings to reflect property type change
uhKevinMC Jun 9, 2024
f4686f0
fix: tests
uhKevinMC Jun 9, 2024
2c4bc44
chore: rebase branch
uhKevinMC Jun 9, 2024
e241cea
fix: adjust tests
uhKevinMC Jun 10, 2024
316e7cc
refactor: combine partials logic into one statement
uhKevinMC Jun 11, 2024
f4b2911
docs: mark getter as readonly
uhKevinMC Jun 11, 2024
4203f09
refactor: apply suggestions
uhKevinMC Jun 30, 2024
e16401e
refactor(Actions): apply suggestions
uhKevinMC Jun 30, 2024
ec18c50
refactor(PollAnswerVoterManager): apply suggestions
uhKevinMC Jun 30, 2024
598fbfd
refactor(Message): check for existing poll before creating a poll
uhKevinMC Jun 30, 2024
8780adb
refactor(Polls): apply suggestions
uhKevinMC Jun 30, 2024
fa4dc3f
revert(types): remove unused method from Poll class
uhKevinMC Jun 30, 2024
bfbb377
refactor(Actions): consolidate poll creation logic into action class
uhKevinMC Jul 1, 2024
2eec293
refactor(PollAnswerVoterManager): set default for fetch parameter
uhKevinMC Jul 1, 2024
6e632ba
refactor(Message): apply suggestion
uhKevinMC Jul 1, 2024
4857a94
fix: remove partial setter
uhKevinMC Jul 1, 2024
bb2a2ad
refactor(Polls): apply suggestions
uhKevinMC Jul 1, 2024
418c23b
types: apply suggestions
uhKevinMC Jul 1, 2024
2e54eff
Merge branch 'discordjs:main' into main
uhKevinMC Jul 1, 2024
2f85ad8
refactor: remove clones
uhKevinMC Jul 3, 2024
93f2a36
docs: spacing
uhKevinMC Jul 3, 2024
c25c650
refactor: move setters from constructor to _patch
uhKevinMC Jul 3, 2024
060cc52
types: adjust partials for poll classes
uhKevinMC Jul 3, 2024
cea18b0
test: add more tests for polls
uhKevinMC Jul 3, 2024
46f55e4
refactor: move updates around, more correct partial types
almeidx Jul 4, 2024
4c65504
fix: handle more cases
almeidx Jul 4, 2024
a82f3a3
refactor: requested changes
almeidx Aug 24, 2024
1ddb5ab
Merge branch 'main' into main
almeidx Aug 24, 2024
71f1c65
Merge branch 'main' into main
almeidx Sep 22, 2024
f72c1f6
Merge branch 'main' into main
almeidx Dec 21, 2024
d103cd9
fix: missing imports
almeidx Dec 24, 2024
a8a4f29
Merge branch 'main' into main
almeidx Jan 12, 2025
ba19104
Merge branch 'main' into main
almeidx Jan 21, 2025
955cf6a
fix: update imports
almeidx Jan 21, 2025
6e73d7b
Merge branch 'main' into main
almeidx Feb 4, 2025
fa0244a
fix: require file extensions
almeidx Feb 4, 2025
908f2a3
Merge branch 'main' into main
Qjuh Feb 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use fetch method in manager instead
uhKevinMC committed Jun 6, 2024
commit e33342ced207324ce761967738ad5e6d5a34d244
7 changes: 1 addition & 6 deletions packages/discord.js/src/structures/PollAnswer.js
Original file line number Diff line number Diff line change
@@ -92,12 +92,7 @@ class PollAnswer extends Base {
* @returns {Promise<Collection<Snowflake, User>>}
*/
fetchVoters({ after, limit } = {}) {
uhKevinMC marked this conversation as resolved.
Show resolved Hide resolved
return this.poll.message.channel.messages.fetchPollAnswerVoters({
messageId: this.poll.message.id,
answerId: this.id,
after,
limit,
});
return this.users.fetch({ after, limit });
}
}