A /color slash command that shows a dropdown with options, receives the member's choice and updates the message. Useful for roles, settings and categories.
Discord Discord.js Slash Commands Select Menu Components Bot Code
- Put the code in a
color.jsfile inside thecommandsfolder - In your
interactionCreateevent add:if (i.isStringSelectMenu() && i.customId === 'color_menu') return require('./commands/color').onSelect(i);then start with {{Run command}} - Use
/colorand try the menu; add more options the same way
# Run command
node index.js- ضع الكود في ملف
color.jsداخل مجلدcommands - أضف في حدث
interactionCreate:if (i.isStringSelectMenu() && i.customId === 'color_menu') return require('./commands/color').onSelect(i);ثم شغّل {{أمر التشغيل}} - استخدم
/colorوجرّب القائمة؛ أضف خيارات بنفس الطريقة
See color.js.
كود أمر قائمة اختيار (Select Menu)
أمر سلاش /color يعرض قائمة منسدلة بخيارات، ويستقبل اختيار العضو ويحدّث الرسالة. مفيد للرتب والإعدادات والأقسام.
Made with ❤️ — more projects at https://ahmadds.qzz.io