From 74f180e9c31acd657cc891e7b00dffe4a83b27c0 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Wed, 25 Aug 2021 23:08:27 -0600 Subject: [PATCH] pagination buggybois --- util/pagination.js | 3 ++- util/ts/pagination.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/util/pagination.js b/util/pagination.js index 17df12a..4d60232 100644 --- a/util/pagination.js +++ b/util/pagination.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Pagination = void 0; +const discord_js_1 = require("discord.js"); class Pagination { constructor(channel, pages, originalMessage, client, loopPages, message) { this.loopPages = true; @@ -21,7 +22,7 @@ class Pagination { async setPage(page) { if (this.pages.length < page + 1) { } if (!this.message) { - let tempm = await this.channel.send("One moment...") + let tempm = await this.channel.send({ embeds: [new discord_js_1.MessageEmbed().setDescription("One moment...")] }) .catch(() => { this.originalMessage.reply("There seemed to be a problem doing that..."); return this; }); if (tempm instanceof Pagination) { return this; diff --git a/util/ts/pagination.ts b/util/ts/pagination.ts index 2132708..4ab27ce 100644 --- a/util/ts/pagination.ts +++ b/util/ts/pagination.ts @@ -1,4 +1,4 @@ -import {TextChannel, Message, MessageEmbed, Client, MessageReaction, ReactionCollector} from 'discord.js'; +import {TextChannel, Message, MessageEmbed, Client, MessageReaction, ReactionCollector, DiscordAPIError} from 'discord.js'; export class Pagination { channel: TextChannel; @@ -30,7 +30,7 @@ export class Pagination { if (this.pages.length < page + 1) {} if (!this.message) { - let tempm = await this.channel.send("One moment...") + let tempm = await this.channel.send({embeds: [new MessageEmbed().setDescription("One moment...")]}) .catch(() => {this.originalMessage.reply("There seemed to be a problem doing that..."); return this;}); if (tempm instanceof Pagination) {return this;} else {this.message = tempm;}