fix: poll builders (#10783)

* fix: poll builders

- Fixed validations
- Added missing documentation
- Removed redundant code
- Consistency™️

* fix: tests

* feat: missing answers test
This commit is contained in:
Almeida
2025-03-01 14:57:00 +00:00
committed by GitHub
parent 88bfeaab22
commit d1f56ffb2a
7 changed files with 73 additions and 33 deletions

View File

@@ -161,7 +161,7 @@ export class PollBuilder implements JSONEncodable<RESTAPIPoll> {
* @param updater - The function to update the question with
*/
public updateQuestion(updater: (builder: PollQuestionBuilder) => void): this {
updater((this.data.question ??= new PollQuestionBuilder()));
updater(this.data.question);
return this;
}