summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/structures/SelectMenuComponent.js
blob: 2cd8097c95f357918f5a925446d685105a66981c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict';

const process = require('node:process');
const StringSelectMenuComponent = require('./StringSelectMenuComponent');

let deprecationEmitted = false;

/**
 * @deprecated Use {@link StringSelectMenuComponent} instead.
 * @extends {StringSelectMenuComponent}
 */
class SelectMenuComponent extends StringSelectMenuComponent {
  constructor(...params) {
    super(...params);

    if (!deprecationEmitted) {
      process.emitWarning(
        'The SelectMenuComponent class is deprecated. Use StringSelectMenuComponent instead.',
        'DeprecationWarning',
      );
      deprecationEmitted = true;
    }
  }
}

module.exports = SelectMenuComponent;