Skip to content

Commit 7f29356

Browse files
authored
fix: ending uncached polls (#11157)
1 parent 230e746 commit 7f29356

File tree

1 file changed

+1
-1
lines changed
  • packages/discord.js/src/structures

1 file changed

+1
-1
lines changed

packages/discord.js/src/structures/Poll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class Poll extends Base {
179179
* @returns {Promise<Message>}
180180
*/
181181
async end() {
182-
if (Date.now() > this.expiresTimestamp) {
182+
if (this.expiresTimestamp !== null && Date.now() > this.expiresTimestamp) {
183183
throw new DiscordjsError(ErrorCodes.PollAlreadyExpired);
184184
}
185185

0 commit comments

Comments
 (0)