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:
@@ -179,7 +179,7 @@ class Poll extends Base {
|
|||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
*/
|
*/
|
||||||
async end() {
|
async end() {
|
||||||
if (Date.now() > this.expiresTimestamp) {
|
if (this.expiresTimestamp !== null && Date.now() > this.expiresTimestamp) {
|
||||||
throw new DiscordjsError(ErrorCodes.PollAlreadyExpired);
|
throw new DiscordjsError(ErrorCodes.PollAlreadyExpired);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user