diff --git a/packages/discord.js/src/structures/ActionRow.js b/packages/discord.js/src/structures/ActionRow.js index d5fb48561..67aeebbaa 100644 --- a/packages/discord.js/src/structures/ActionRow.js +++ b/packages/discord.js/src/structures/ActionRow.js @@ -1,5 +1,6 @@ 'use strict'; +const { deprecate } = require('node:util'); const { isJSONEncodable } = require('@discordjs/builders'); const Component = require('./Component'); const { createComponent } = require('../util/Components'); @@ -24,6 +25,7 @@ class ActionRow extends Component { * Creates a new action row builder from JSON data * @param {JSONEncodable|APIActionRowComponent} other The other data * @returns {ActionRowBuilder} + * @deprecated Use {@link ActionRowBuilder.from()} instead. */ static from(other) { if (isJSONEncodable(other)) { @@ -41,4 +43,6 @@ class ActionRow extends Component { } } +ActionRow.from = deprecate(ActionRow.from, 'ActionRow.from() is deprecated. Use ActionRowBuilder.from() instead.'); + module.exports = ActionRow;