File tree Expand file tree Collapse file tree 4 files changed +14
-29
lines changed Expand file tree Collapse file tree 4 files changed +14
-29
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ class PollAnswerVoterManager extends CachedManager {
3030 * @name PollAnswerVoterManager#cache
3131 */
3232
33+ /**
34+ * Options used for fetching voters of a poll answer.
35+ *
36+ * @typedef {Object } BaseFetchPollAnswerVotersOptions
37+ * @property {number } [limit] The maximum number of voters to fetch
38+ * @property {Snowflake } [after] The user id to fetch voters after
39+ */
40+
3341 /**
3442 * Fetches the users that voted on this poll answer. Resolves with a collection of users, mapped by their ids.
3543 *
Original file line number Diff line number Diff line change @@ -93,25 +93,6 @@ class PollAnswer extends Base {
9393 get partial ( ) {
9494 return this . poll . partial || ( this . text === null && this . emoji === null ) ;
9595 }
96-
97- /**
98- * Options used for fetching voters of a poll answer.
99- *
100- * @typedef {Object } BaseFetchPollAnswerVotersOptions
101- * @property {number } [limit] The maximum number of voters to fetch
102- * @property {Snowflake } [after] The user id to fetch voters after
103- */
104-
105- /**
106- * Fetches the users that voted for this answer.
107- *
108- * @param {BaseFetchPollAnswerVotersOptions } [options={}] The options for fetching voters
109- * @returns {Promise<Collection<Snowflake, User>> }
110- * @deprecated Use {@link PollAnswerVoterManager#fetch} instead
111- */
112- async fetchVoters ( { after, limit } = { } ) {
113- return this . voters . fetch ( { after, limit } ) ;
114- }
11596}
11697
11798exports . PollAnswer = PollAnswer ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ client.on(Events.ClientReady, async () => {
1616 // console.dir(message.poll, { depth: Infinity });
1717
1818 // const answer = message.poll.answers.first();
19- // const voters = await answer.fetchVoters ();
19+ // const voters = await answer.voters.fetch ();
2020 // console.dir(voters);
2121
2222 const message = await channel . send ( {
Original file line number Diff line number Diff line change @@ -2753,6 +2753,11 @@ export interface PollQuestionMedia {
27532753 text : string | null ;
27542754}
27552755
2756+ export interface BaseFetchPollAnswerVotersOptions {
2757+ after ?: Snowflake ;
2758+ limit ?: number ;
2759+ }
2760+
27562761export class PollAnswerVoterManager extends CachedManager < Snowflake , User , UserResolvable > {
27572762 private constructor ( answer : PollAnswer ) ;
27582763 public answer : PollAnswer ;
@@ -2777,11 +2782,6 @@ export class Poll extends Base {
27772782 public end ( ) : Promise < Message > ;
27782783}
27792784
2780- export interface BaseFetchPollAnswerVotersOptions {
2781- after ?: Snowflake ;
2782- limit ?: number ;
2783- }
2784-
27852785export class PollAnswer extends Base {
27862786 private constructor ( client : Client < true > , data : APIPollAnswer & { count ?: number } , poll : Poll ) ;
27872787 private readonly _emoji : APIPartialEmoji | null ;
@@ -2792,10 +2792,6 @@ export class PollAnswer extends Base {
27922792 public voters : PollAnswerVoterManager ;
27932793 public get emoji ( ) : Emoji | GuildEmoji | null ;
27942794 public get partial ( ) : false ;
2795- /**
2796- * @deprecated Use {@link PollAnswerVoterManager.fetch} instead
2797- */
2798- public fetchVoters ( options ?: BaseFetchPollAnswerVotersOptions ) : Promise < Collection < Snowflake , User > > ;
27992795}
28002796
28012797export interface ReactionCollectorEventTypes extends CollectorEventTypes < Snowflake | string , MessageReaction , [ User ] > {
You can’t perform that action at this time.
0 commit comments