From d59a5c30d0071ddf7b084060fc339d9593975774 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 15 Jul 2022 01:53:23 +0700 Subject: [PATCH] Revert "Merge pull request #205 from websharik/main" This reverts commit e284ef51ee54def132acbbd96202c51b11d70b67, reversing changes made to 40db78ea7d93e00d35001d1bd0c6c515b077df2c. --- src/managers/MessageManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/managers/MessageManager.js b/src/managers/MessageManager.js index 1fa5ab4..a29ce45 100644 --- a/src/managers/MessageManager.js +++ b/src/managers/MessageManager.js @@ -1,6 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); +const BigNumber = require('bignumber.js'); const CachedManager = require('./CachedManager'); const { TypeError, Error } = require('../errors'); const { Message } = require('../structures/Message'); @@ -222,7 +223,7 @@ class MessageManager extends CachedManager { // Const data = await this.client.api.channels[this.channel.id].messages[messageId].get(); // Discord Block // https://canary.discord.com/api/v9/guilds/809133733591384155/messages/search?channel_id=840225732902518825&max_id=957254525360697375&min_id=957254525360697373 const data = ( - await this.client.api.channels[this.channel.id].messages.get({ query: { limit: 1, around: messageId } }) + await this.client.api.channels[this.channel.id].messages.get({ query: { limit: 1, around: messageId }}) ).messages[0]; if (data) return this._add(data[0], cache); else throw new Error('MESSAGE_ID_NOT_FOUND');