Skip to content

Commit

Permalink
fix: missed places
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Dec 5, 2024
1 parent d945ea9 commit b5fd7f7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/discord.js/src/client/websocket/handlers/READY.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = (client, { d: data }, shardId) => {
if (client.user) {
client.user._patch(data.user);
} else {
ClientUser ??= require('../../../structures/ClientUser');
ClientUser ??= require('../../../structures/ClientUser').ClientUser;
client.user = new ClientUser(client, data.user);
client.users.cache.set(client.user.id, client.user);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/discord.js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports.Options = require('./util/Options').Options;
exports.Partials = require('./util/Partials').Partials;
exports.PermissionsBitField = require('./util/PermissionsBitField').PermissionsBitField;
exports.RoleFlagsBitField = require('./util/RoleFlagsBitField').RoleFlagsBitField;
exports.ShardEvents = require('./util/ShardEvents');
exports.ShardEvents = require('./util/ShardEvents').ShardEvents;
exports.SKUFlagsBitField = require('./util/SKUFlagsBitField').SKUFlagsBitField;
exports.SnowflakeUtil = require('@sapphire/snowflake').DiscordSnowflake;
exports.Status = require('./util/Status').Status;
Expand All @@ -58,7 +58,7 @@ exports.ApplicationCommandPermissionsManager =
require('./managers/ApplicationCommandPermissionsManager').ApplicationCommandPermissionsManager;
exports.ApplicationEmojiManager = require('./managers/ApplicationEmojiManager').ApplicationEmojiManager;
exports.AutoModerationRuleManager = require('./managers/AutoModerationRuleManager').AutoModerationRuleManager;
exports.BaseGuildEmojiManager = require('./managers/BaseGuildEmojiManager');
exports.BaseGuildEmojiManager = require('./managers/BaseGuildEmojiManager').BaseGuildEmojiManager;
exports.CachedManager = require('./managers/CachedManager').CachedManager;
exports.ChannelManager = require('./managers/ChannelManager').ChannelManager;
exports.ClientVoiceManager = require('./client/voice/ClientVoiceManager').ClientVoiceManager;
Expand Down
5 changes: 3 additions & 2 deletions packages/discord.js/src/structures/ActionRowBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

const { ActionRowBuilder: BuildersActionRow } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { createComponentBuilder } = require('../util/Components');
const { toSnakeCase } = require('../util/Transformers');

/**
* Represents an action row builder.
Expand All @@ -29,6 +27,9 @@ class ActionRowBuilder extends BuildersActionRow {

exports.ActionRowBuilder = ActionRowBuilder;

const { createComponentBuilder } = require('../util/Components');
const { toSnakeCase } = require('../util/Transformers');

/**
* @external BuildersActionRow
* @see {@link https://discord.js.org/docs/packages/builders/stable/ActionRowBuilder:Class}
Expand Down
6 changes: 3 additions & 3 deletions packages/discord.js/src/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { Base } = require('./Base');
const { ClientApplication } = require('./ClientApplication');
const { Embed } = require('./Embed');
const { InteractionCollector } = require('./InteractionCollector');
const { Mentions } = require('./MessageMentions');
const { MessageMentions } = require('./MessageMentions');
const { MessagePayload } = require('./MessagePayload');
const { Poll } = require('./Poll.js');
const { ReactionCollector } = require('./ReactionCollector');
Expand Down Expand Up @@ -269,7 +269,7 @@ class Message extends Base {
* All valid mentions that the message contains
* @type {MessageMentions}
*/
this.mentions = new Mentions(
this.mentions = new MessageMentions(
this,
data.mentions,
data.mention_roles,
Expand All @@ -278,7 +278,7 @@ class Message extends Base {
data.referenced_message?.author,
);
} else {
this.mentions = new Mentions(
this.mentions = new MessageMentions(
this,
data.mentions ?? this.mentions.users,
data.mention_roles ?? this.mentions.roles,
Expand Down
22 changes: 11 additions & 11 deletions packages/discord.js/src/util/Channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
const { lazy } = require('@discordjs/util');
const { ChannelType } = require('discord-api-types/v10');

const getCategoryChannel = lazy(() => require('../structures/CategoryChannel'));
const getDMChannel = lazy(() => require('../structures/DMChannel'));
const getAnnouncementChannel = lazy(() => require('../structures/AnnouncementChannel'));
const getStageChannel = lazy(() => require('../structures/StageChannel'));
const getTextChannel = lazy(() => require('../structures/TextChannel'));
const getThreadChannel = lazy(() => require('../structures/ThreadChannel'));
const getVoiceChannel = lazy(() => require('../structures/VoiceChannel'));
const getDirectoryChannel = lazy(() => require('../structures/DirectoryChannel'));
const getPartialGroupDMChannel = lazy(() => require('../structures/PartialGroupDMChannel'));
const getForumChannel = lazy(() => require('../structures/ForumChannel'));
const getMediaChannel = lazy(() => require('../structures/MediaChannel'));
const getCategoryChannel = lazy(() => require('../structures/CategoryChannel').CategoryChannel);
const getDMChannel = lazy(() => require('../structures/DMChannel').DMChannel);
const getAnnouncementChannel = lazy(() => require('../structures/AnnouncementChannel').AnnouncementChannel);
const getStageChannel = lazy(() => require('../structures/StageChannel').StageChannel);
const getTextChannel = lazy(() => require('../structures/TextChannel').TextChannel);
const getThreadChannel = lazy(() => require('../structures/ThreadChannel').ThreadChannel);
const getVoiceChannel = lazy(() => require('../structures/VoiceChannel').VoiceChannel);
const getDirectoryChannel = lazy(() => require('../structures/DirectoryChannel').DirectoryChannel);
const getPartialGroupDMChannel = lazy(() => require('../structures/PartialGroupDMChannel').PartialGroupDMChannel);
const getForumChannel = lazy(() => require('../structures/ForumChannel').ForumChannel);
const getMediaChannel = lazy(() => require('../structures/MediaChannel').MediaChannel);

/**
* Extra options for creating a channel.
Expand Down

0 comments on commit b5fd7f7

Please sign in to comment.