mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
refactor: remove user bot methods (#2559)
* [WIP] Remove user bots * more backend userbot removal * Add mfaEnabled back * revert client presences store removal * partially revert getAuth changes * remove more no longer used children of ClientUserGuildSettings * fix a bug with this pr and TextBasedChannel.applyToClass * remove a syncGuilds reference * more user bot data handling * various guildSync cleanup * bots can't call logout Had the user/bot portions of the code mixed up. Though, does this need to be a promise anymore? * make ClientManager#destroy() sync It nolonger needs to be a promise, and nothing depended on it being a promise that I can tell. * requested change * Fix massive error * no longer used as it's userbot only
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const DataStore = require('./DataStore');
|
||||
const Collection = require('../util/Collection');
|
||||
const Message = require('../structures/Message');
|
||||
const { Error } = require('../errors');
|
||||
|
||||
/**
|
||||
* Stores messages for text-based channels.
|
||||
@@ -80,12 +79,6 @@ class MessageStore extends DataStore {
|
||||
}
|
||||
|
||||
async _fetchId(messageID) {
|
||||
if (!this.client.user.bot) {
|
||||
const messages = await this._fetchMany({ limit: 1, around: messageID });
|
||||
const msg = messages.get(messageID);
|
||||
if (!msg) throw new Error('MESSAGE_MISSING');
|
||||
return msg;
|
||||
}
|
||||
const data = await this.client.api.channels[this.channel.id].messages[messageID].get();
|
||||
return this.add(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user