diff --git a/util/pagination.js b/util/pagination.js index 3bf1676..44a72d7 100644 --- a/util/pagination.js +++ b/util/pagination.js @@ -112,7 +112,9 @@ class Pagination { async updateControllers() { return this; } ; async endControllers() { - await this.message.reactions.removeAll(); + if (this.message.guild) { + await this.message.reactions.removeAll().catch(() => { }); + } this.controllers.collector.stop(); let fe = this.message.embeds[0]; fe.setDescription(`${fe.description}\n\n*This menu has ended, start a new one to interact with it!*`); diff --git a/util/ts/pagination.ts b/util/ts/pagination.ts index 41fd072..5d571dc 100644 --- a/util/ts/pagination.ts +++ b/util/ts/pagination.ts @@ -121,7 +121,7 @@ export class Pagination { public async updateControllers(): Promise {return this;}; public async endControllers(): Promise { - await this.message.reactions.removeAll(); + if (this.message.guild) {await this.message.reactions.removeAll().catch(() => {});} this.controllers.collector.stop(); let fe = this.message.embeds[0];