discord.js icon indicating copy to clipboard operation
discord.js copied to clipboard

`SelectMenuOptionBuilder#setDescription` does not accept null or undefined values

Open Gorniaky opened this issue 3 years ago • 3 comments

Which package is this bug report for?

builders

Issue description

Like other constructors, making this one accept null or undefined.

Error: image

Code sample

import { SelectMenuOptionBuilder } from 'discord.js';

new SelectMenuOptionBuilder()
  .setDescription(null);

Package version

discord.js@^14.0.3 - @discordjs/builders@^0.14.0

Node.js version

18.6.0

Operating system

Windows 10 IoT Enterprise LTSC 21H2

Priority this issue should have

Low (slightly annoying)

Which partials do you have configured?

Not applicable (subpackage bug)

Which gateway intents are you subscribing to?

Not applicable (subpackage bug)

I have tested this issue on a development release

No response

Gorniaky avatar Jul 24 '22 14:07 Gorniaky

This is also a problem with the other non-required property setters (e.g. setEmoji), also for the other components

almeidx avatar Jul 26 '22 20:07 almeidx

Also SelectMenuBuilder don't have value submited when used in modal Always undefined We can't set label on it when used in modal

Identity-labs avatar Aug 02 '22 19:08 Identity-labs

Also SelectMenuBuilder don't have value submited when used in modal Always undefined We can't set label on it when used in modal

SelectMenus are not supported in Modals. Discord has not announced or released the feature officially.

monbrey avatar Aug 02 '22 20:08 monbrey