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:
DD
2024-05-04 22:06:03 +03:00
committed by GitHub
parent c91d03c535
commit 0474a43751
5 changed files with 7 additions and 12 deletions

View File

@@ -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>>;
}

View File

@@ -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,
});