Skip to content

Commit 1d5b983

Browse files
almeidxJiralite
authored andcommitted
fix: ending uncached polls (#11157)
1 parent 8065b80 commit 1d5b983

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
@@ -164,7 +164,7 @@ class Poll extends Base {
164164
* @returns {Promise<Message>}
165165
*/
166166
async end() {
167-
if (Date.now() > this.expiresTimestamp) {
167+
if (this.expiresTimestamp !== null && Date.now() > this.expiresTimestamp) {
168168
throw new DiscordjsError(ErrorCodes.PollAlreadyExpired);
169169
}
170170

0 commit comments

Comments
 (0)