mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 13:33:30 +01:00
fix(MessageManager): poll methods don't need a channel id (#10249)
* fix(MessageManager): end poll does not need channel id * chore: rest of the work
This commit is contained in:
3
packages/discord.js/typings/index.d.ts
vendored
3
packages/discord.js/typings/index.d.ts
vendored
@@ -4399,7 +4399,6 @@ export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleRes
|
||||
}
|
||||
|
||||
export interface FetchPollAnswerVotersOptions extends BaseFetchPollAnswerVotersOptions {
|
||||
channelId: Snowflake;
|
||||
messageId: Snowflake;
|
||||
answerId: number;
|
||||
}
|
||||
@@ -4422,7 +4421,7 @@ export abstract class MessageManager<InGuild extends boolean = boolean> extends
|
||||
public react(message: MessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>;
|
||||
public pin(message: MessageResolvable, reason?: string): Promise<void>;
|
||||
public unpin(message: MessageResolvable, reason?: string): Promise<void>;
|
||||
public endPoll(channelId: Snowflake, messageId: Snowflake): Promise<Message>;
|
||||
public endPoll(messageId: Snowflake): Promise<Message>;
|
||||
public fetchPollAnswerVoters(options: FetchPollAnswerVotersOptions): Promise<Collection<Snowflake, User>>;
|
||||
}
|
||||
|
||||
|
||||
@@ -2549,9 +2549,8 @@ declare const poll: Poll;
|
||||
|
||||
expectType<Collection<Snowflake, User>>(await answer.fetchVoters({ after: snowflake, limit: 10 }));
|
||||
|
||||
await messageManager.endPoll(snowflake, snowflake);
|
||||
await messageManager.endPoll(snowflake);
|
||||
await messageManager.fetchPollAnswerVoters({
|
||||
channelId: snowflake,
|
||||
messageId: snowflake,
|
||||
answerId: 1,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user