djs-builder 0.6.15 → 0.6.16

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.
package/README.md CHANGED
@@ -199,7 +199,7 @@ const { Wait } = require('djs-builder');
199
199
  const message = await Wait({
200
200
  context: message, /// message or interaction
201
201
  userId : (message.author.id || interaction.user.id), /// user id
202
- type: "button", /// message or button or both 💪
202
+ type: "interaction", /// message to wait message or interaction to wait button/menu or both 💪
203
203
  time: 30000 /// time in ms
204
204
  message_Wait : message /// message of button (for button or both)
205
205
  });
@@ -73,7 +73,7 @@ async function Wait({
73
73
  }
74
74
  }
75
75
 
76
- if (type === "button") {
76
+ if (type === "interaction") {
77
77
  const message = message_Wait;
78
78
  if (!message)
79
79
  throw new Error(
@@ -240,14 +240,14 @@ async function GetUser(message) {
240
240
  let user = message.mentions.members.first();
241
241
  let new_args = args;
242
242
 
243
- // إذا ماكو منشن → جرب الـ ID
243
+
244
244
  if (!user && args[0]) {
245
245
  const userId = args[0];
246
246
  user = await message.guild.members.fetch(userId).catch(() => null);
247
247
  new_args = args.slice(1);
248
248
  }
249
249
 
250
- // إذا ماكو منشن ولا ID → جرب الرد
250
+
251
251
  if (!user && message.reference) {
252
252
  const repliedMessage = await message.channel.messages
253
253
  .fetch(message.reference.messageId)
@@ -244,7 +244,7 @@ async function starter(client, options) {
244
244
  ) {
245
245
  return interaction.reply({
246
246
  content: "`❌` هذا الأمر محصور لصاحب السيرفر فقط!",
247
- ephemeral: true,
247
+ flags: 64,
248
248
  });
249
249
  }
250
250
 
@@ -255,21 +255,21 @@ async function starter(client, options) {
255
255
  ) {
256
256
  return interaction.reply({
257
257
  content: "`❌` هذا الأمر محصور لصاحب البوت فقط!",
258
- ephemeral: true,
258
+ flags: 64,
259
259
  });
260
260
  }
261
261
 
262
262
  if (command.guildOnly && !interaction.guild) {
263
263
  return interaction.reply({
264
264
  content: "`❌` هذا الأمر محصور لسيرفرات فقط!",
265
- ephemeral: true,
265
+ flags: 64,
266
266
  });
267
267
  }
268
268
 
269
269
  if (command.dmOnly && interaction.guild) {
270
270
  return interaction.reply({
271
271
  content: "`❌` هذا الأمر محصور لمحادثات الخاصة فقط!",
272
- ephemeral: true,
272
+ flags: 64,
273
273
  });
274
274
  }
275
275
 
@@ -282,7 +282,7 @@ async function starter(client, options) {
282
282
  ) {
283
283
  return interaction.reply({
284
284
  content: "`❌` أنت لا تملك صلاحيات كافية لتنفيذ هذا الأمر.",
285
- ephemeral: true,
285
+ flags: 64,
286
286
  });
287
287
  }
288
288
 
@@ -298,12 +298,12 @@ async function starter(client, options) {
298
298
  if (interaction.replied || interaction.deferred) {
299
299
  await interaction.followUp({
300
300
  content: "`❌` حدث خطأ أثناء تنفيذ الأمر.",
301
- ephemeral: true,
301
+ flags: 64,
302
302
  });
303
303
  } else {
304
304
  await interaction.reply({
305
305
  content: "`❌` حدث خطأ أثناء تنفيذ الأمر.",
306
- ephemeral: true,
306
+ flags: 64,
307
307
  });
308
308
  }
309
309
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "djs-builder",
4
- "version": "0.6.15",
4
+ "version": "0.6.16",
5
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)",
6
6
  "main": "handler/starter.js",
7
7
  "dependencies": {