Skip to content

Commit

Permalink
fix: correct isJSONEncodable() import (#9495)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiralite <[email protected]>
  • Loading branch information
almeidx and Jiralite authored May 1, 2023
1 parent b327f49 commit 201b002
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const { isJSONEncodable } = require('@discordjs/builders');
const { Collection } = require('@discordjs/collection');
const { makeURLSearchParams } = require('@discordjs/rest');
const { isJSONEncodable } = require('@discordjs/util');
const { Routes } = require('discord-api-types/v10');
const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager');
const CachedManager = require('./CachedManager');
Expand Down
2 changes: 1 addition & 1 deletion packages/discord.js/src/structures/ActionRow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const { deprecate } = require('node:util');
const { isJSONEncodable } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const Component = require('./Component');
const { createComponent } = require('../util/Components');

Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/ActionRowBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

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

Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/ButtonBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { ButtonBuilder: BuildersButton, isJSONEncodable } = require('@discordjs/builders');
const { ButtonBuilder: BuildersButton } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');
const { resolvePartialEmoji } = require('../util/Util');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu, isJSONEncodable } = require('@discordjs/builders');
const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/EmbedBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { EmbedBuilder: BuildersEmbed, isJSONEncodable } = require('@discordjs/builders');
const { EmbedBuilder: BuildersEmbed } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');
const { resolveColor } = require('../util/Util');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu, isJSONEncodable } = require('@discordjs/builders');
const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');

/**
Expand Down
3 changes: 1 addition & 2 deletions packages/discord.js/src/structures/MessagePayload.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';

const { Buffer } = require('node:buffer');
const { isJSONEncodable } = require('@discordjs/builders');
const { lazy } = require('@discordjs/util');
const { lazy, isJSONEncodable } = require('@discordjs/util');
const { MessageFlags } = require('discord-api-types/v10');
const ActionRowBuilder = require('./ActionRowBuilder');
const { DiscordjsRangeError, ErrorCodes } = require('../errors');
Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/ModalBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { ModalBuilder: BuildersModal, ComponentBuilder, isJSONEncodable } = require('@discordjs/builders');
const { ModalBuilder: BuildersModal, ComponentBuilder } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/RoleSelectMenuBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { RoleSelectMenuBuilder: BuildersRoleSelectMenu, isJSONEncodable } = require('@discordjs/builders');
const { RoleSelectMenuBuilder: BuildersRoleSelectMenu } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { SelectMenuBuilder: BuildersSelectMenu, isJSONEncodable, normalizeArray } = require('@discordjs/builders');
const { SelectMenuBuilder: BuildersSelectMenu, normalizeArray } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');
const { resolvePartialEmoji } = require('../util/Util');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { SelectMenuOptionBuilder: BuildersSelectMenuOption, isJSONEncodable } = require('@discordjs/builders');
const { SelectMenuOptionBuilder: BuildersSelectMenuOption } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');
const { resolvePartialEmoji } = require('../util/Util');

Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/TextInputBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { TextInputBuilder: BuildersTextInput, isJSONEncodable } = require('@discordjs/builders');
const { TextInputBuilder: BuildersTextInput } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/discord.js/src/structures/UserSelectMenuBuilder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const { UserSelectMenuBuilder: BuildersUserSelectMenu, isJSONEncodable } = require('@discordjs/builders');
const { UserSelectMenuBuilder: BuildersUserSelectMenu } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { isJSONEncodable } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { InteractionResponseType, MessageFlags, Routes, InteractionType } = require('discord-api-types/v10');
const { DiscordjsError, ErrorCodes } = require('../../errors');
const InteractionCollector = require('../InteractionCollector');
Expand Down

0 comments on commit 201b002

Please sign in to comment.