mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: ending uncached polls (#11157)
This commit is contained in:
@@ -164,7 +164,7 @@ class Poll extends Base {
|
||||
* @returns {Promise<Message>}
|
||||
*/
|
||||
async end() {
|
||||
if (Date.now() > this.expiresTimestamp) {
|
||||
if (this.expiresTimestamp !== null && Date.now() > this.expiresTimestamp) {
|
||||
throw new DiscordjsError(ErrorCodes.PollAlreadyExpired);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user