djs-builder 0.6.16 → 0.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,10 +75,6 @@ async function Wait({
75
75
 
76
76
  if (type === "interaction") {
77
77
  const message = message_Wait;
78
- if (!message)
79
- throw new Error(
80
- "You must provide messageWithButtons when using type 'button'."
81
- );
82
78
 
83
79
  try {
84
80
  const collected = await message.awaitMessageComponent({
@@ -92,10 +88,6 @@ async function Wait({
92
88
  }
93
89
 
94
90
  if (type === "both") {
95
- if (!message_Wait)
96
- throw new Error(
97
- "You must provide messageWithButtons when using type 'both'."
98
- );
99
91
 
100
92
  return new Promise((resolve) => {
101
93
  const collectors = [];
@@ -187,7 +179,8 @@ function CreateRow(components) {
187
179
  value = false,
188
180
  id = false,
189
181
  max = false,
190
- min = false,
182
+ min = false,
183
+ disabled = false
191
184
  } = options;
192
185
 
193
186
  const selectOptions = data.map((item, index) => {
@@ -224,6 +217,10 @@ function CreateRow(components) {
224
217
  selectMenu.addOptions(selectOptions);
225
218
  }
226
219
 
220
+ if (options.hasOwnProperty("disabled")) {
221
+ selectMenu.setDisabled(options.disabled);
222
+ }
223
+
227
224
  actionRows.push(new ActionRowBuilder().addComponents(selectMenu));
228
225
  } else {
229
226
  throw new Error("Invalid component format");
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  {
3
3
  "name": "djs-builder",
4
- "version": "0.6.16",
5
- "description": "šŸŽ‰ Package Update! šŸ„\nNew features added:\n- `GetUser`: Easily fetch a user from **ID**, **mention**, or even from a **reply**.\n\nšŸ›  Fixes:\n- Minor bugs fixed\n- Improved stability and error handling\n\nšŸ”— Learn more on [NPM](https://www.npmjs.com/package/djs-builder)",
4
+ "version": "0.6.18",
5
+ "description": "šŸŽ‰ Package Update! šŸ„\n- Add option `disabled` to the selectMenu options \nNew features added:\n- `GetUser`: Easily fetch a user from **ID**, **mention**, or even from a **reply**.\n\nšŸ›  Fixes:\n- Minor bugs fixed\n- Improved stability and error handling\n\nšŸ”— Learn more on [NPM](https://www.npmjs.com/package/djs-builder)",
6
6
  "main": "handler/starter.js",
7
7
  "dependencies": {
8
8
  "axios": "^1.11.0",