|
| 1 | +const { |
| 2 | + SlashCommandBuilder, |
| 3 | + PermissionFlagsBits, |
| 4 | + ActionRowBuilder, |
| 5 | + StringSelectMenuBuilder, |
| 6 | + StringSelectMenuOptionBuilder |
| 7 | +} = require('discord.js'); |
| 8 | + |
| 9 | +module.exports = { |
| 10 | + ...new SlashCommandBuilder() |
| 11 | + .setName('rolesdropdown') |
| 12 | + .setDescription('Create the role dropdowns') |
| 13 | + .setDefaultMemberPermissions( |
| 14 | + PermissionFlagsBits.KickMembers || PermissionFlagsBits.BanMembers |
| 15 | + ), |
| 16 | + |
| 17 | + /** |
| 18 | + * |
| 19 | + * @param {Client} client |
| 20 | + * @param {CommandInteraction} interaction |
| 21 | + * @param {String[]} args |
| 22 | + */ |
| 23 | + |
| 24 | + run: async (client, interaction) => { |
| 25 | + const row1 = new ActionRowBuilder().addComponents( |
| 26 | + new StringSelectMenuBuilder() |
| 27 | + .setCustomId('yearSelect') |
| 28 | + .setPlaceholder('Select your current year') |
| 29 | + .addOptions( |
| 30 | + new StringSelectMenuOptionBuilder() |
| 31 | + .setLabel('Foundation') |
| 32 | + .setValue('0'), |
| 33 | + new StringSelectMenuOptionBuilder() |
| 34 | + .setLabel('First Year') |
| 35 | + .setValue('1'), |
| 36 | + new StringSelectMenuOptionBuilder() |
| 37 | + .setLabel('Second Year') |
| 38 | + .setValue('2'), |
| 39 | + new StringSelectMenuOptionBuilder() |
| 40 | + .setLabel('Year In Industry') |
| 41 | + .setValue('3'), |
| 42 | + new StringSelectMenuOptionBuilder() |
| 43 | + .setLabel('Third Year') |
| 44 | + .setValue('4'), |
| 45 | + new StringSelectMenuOptionBuilder() |
| 46 | + .setLabel('Masters') |
| 47 | + .setValue('5'), |
| 48 | + new StringSelectMenuOptionBuilder() |
| 49 | + .setLabel('PhD') |
| 50 | + .setValue('6'), |
| 51 | + new StringSelectMenuOptionBuilder() |
| 52 | + .setLabel('Graduate') |
| 53 | + .setValue('7') |
| 54 | + )) |
| 55 | + |
| 56 | + const row2 = new ActionRowBuilder().addComponents( |
| 57 | + new StringSelectMenuBuilder() |
| 58 | + .setCustomId('pronounSelect') |
| 59 | + .setPlaceholder('Select your pronouns') |
| 60 | + .addOptions( |
| 61 | + new StringSelectMenuOptionBuilder() |
| 62 | + .setLabel('He/Him') |
| 63 | + .setValue('HeHim'), |
| 64 | + new StringSelectMenuOptionBuilder() |
| 65 | + .setLabel('He/They') |
| 66 | + .setValue('HeThey'), |
| 67 | + new StringSelectMenuOptionBuilder() |
| 68 | + .setLabel('She/Her') |
| 69 | + .setValue('SheHers'), |
| 70 | + new StringSelectMenuOptionBuilder() |
| 71 | + .setLabel('She/They') |
| 72 | + .setValue('SheThey'), |
| 73 | + new StringSelectMenuOptionBuilder() |
| 74 | + .setLabel('They/Them') |
| 75 | + .setValue('TheyThem'), |
| 76 | + new StringSelectMenuOptionBuilder() |
| 77 | + .setLabel('Ask My Pronouns') |
| 78 | + .setValue('Ask'), |
| 79 | + new StringSelectMenuOptionBuilder() |
| 80 | + .setLabel('Any Pronouns') |
| 81 | + .setValue('Any') |
| 82 | + ) |
| 83 | + ) |
| 84 | + |
| 85 | + const row3 = new ActionRowBuilder().addComponents( |
| 86 | + new StringSelectMenuBuilder() |
| 87 | + .setCustomId('bcsSelect') |
| 88 | + .setPlaceholder('Select your BCS status') |
| 89 | + .addOptions( |
| 90 | + new StringSelectMenuOptionBuilder() |
| 91 | + .setLabel('Student Member') |
| 92 | + .setValue('bcsStudent'), |
| 93 | + new StringSelectMenuOptionBuilder() |
| 94 | + .setLabel('Associate Member') |
| 95 | + .setValue('bcsASS'), |
| 96 | + new StringSelectMenuOptionBuilder() |
| 97 | + .setLabel('Professional Member') |
| 98 | + .setValue('bcsProf'), |
| 99 | + new StringSelectMenuOptionBuilder() |
| 100 | + .setLabel('Fellow') |
| 101 | + .setValue('bcsFellow'), |
| 102 | + ) |
| 103 | + ) |
| 104 | + |
| 105 | + const row4 = new ActionRowBuilder().addComponents( |
| 106 | + new StringSelectMenuBuilder() |
| 107 | + .setCustomId('miscSelect') |
| 108 | + .setPlaceholder('Select your misc roles') |
| 109 | + .setMinValues(0) |
| 110 | + .setMaxValues(2) |
| 111 | + .addOptions( |
| 112 | + new StringSelectMenuOptionBuilder() |
| 113 | + .setLabel('Events Ping') |
| 114 | + .setDescription('Get notified of events') |
| 115 | + .setValue('events'), |
| 116 | + new StringSelectMenuOptionBuilder() |
| 117 | + .setLabel('Coursework Help Ping') |
| 118 | + .setDescription('Be notified of coursework help within the coursework forum') |
| 119 | + .setValue('ACWPing'), |
| 120 | + ) |
| 121 | + ) |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + interaction.channel.send({ content: 'Select your year.', components: [row1] }); |
| 130 | + interaction.channel.send({ content: 'Select your pronouns.', components: [row2] }); |
| 131 | + interaction.channel.send({ content: 'Select your BCS status.', components: [row3] }); |
| 132 | + interaction.channel.send({ content: 'Select your misc roles.', components: [row4] }); |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + interaction.reply({ content: 'Dropdowns sent sent.', ephemeral: true }); |
| 138 | + }, |
| 139 | +}; |
0 commit comments