fix: Fix 8ball command
parent
76c6634c91
commit
1ffb82ee13
|
@ -2,8 +2,8 @@ const {
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
PermissionFlagsBits,
|
PermissionFlagsBits,
|
||||||
ActionRowBuilder,
|
ActionRowBuilder,
|
||||||
StringSelectMenuBuilder,
|
StringSelectMenuBuilder,
|
||||||
StringSelectMenuOptionBuilder
|
StringSelectMenuOptionBuilder,
|
||||||
} = require('discord.js');
|
} = require('discord.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -22,117 +22,117 @@ module.exports = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
run: async (client, interaction) => {
|
run: async (client, interaction) => {
|
||||||
const row1 = new ActionRowBuilder().addComponents(
|
const row1 = new ActionRowBuilder().addComponents(
|
||||||
new StringSelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
.setCustomId('yearSelect')
|
.setCustomId('yearSelect')
|
||||||
.setPlaceholder('Select your current year')
|
.setPlaceholder('Select your current year')
|
||||||
.addOptions(
|
.addOptions(
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Foundation')
|
.setLabel('Foundation')
|
||||||
.setValue('0'),
|
.setValue('0'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('First Year')
|
.setLabel('First Year')
|
||||||
.setValue('1'),
|
.setValue('1'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Second Year')
|
.setLabel('Second Year')
|
||||||
.setValue('2'),
|
.setValue('2'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Year In Industry')
|
.setLabel('Year In Industry')
|
||||||
.setValue('3'),
|
.setValue('3'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Third Year')
|
.setLabel('Third Year')
|
||||||
.setValue('4'),
|
.setValue('4'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder().setLabel('Masters').setValue('5'),
|
||||||
.setLabel('Masters')
|
new StringSelectMenuOptionBuilder().setLabel('PhD').setValue('6'),
|
||||||
.setValue('5'),
|
new StringSelectMenuOptionBuilder().setLabel('Graduate').setValue('7')
|
||||||
new StringSelectMenuOptionBuilder()
|
)
|
||||||
.setLabel('PhD')
|
);
|
||||||
.setValue('6'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('Graduate')
|
|
||||||
.setValue('7')
|
|
||||||
))
|
|
||||||
|
|
||||||
const row2 = new ActionRowBuilder().addComponents(
|
|
||||||
new StringSelectMenuBuilder()
|
|
||||||
.setCustomId('pronounSelect')
|
|
||||||
.setPlaceholder('Select your pronouns')
|
|
||||||
.addOptions(
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('He/Him')
|
|
||||||
.setValue('HeHim'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('He/They')
|
|
||||||
.setValue('HeThey'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('She/Her')
|
|
||||||
.setValue('SheHers'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('She/They')
|
|
||||||
.setValue('SheThey'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('They/Them')
|
|
||||||
.setValue('TheyThem'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('Ask My Pronouns')
|
|
||||||
.setValue('Ask'),
|
|
||||||
new StringSelectMenuOptionBuilder()
|
|
||||||
.setLabel('Any Pronouns')
|
|
||||||
.setValue('Any')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
const row3 = new ActionRowBuilder().addComponents(
|
const row2 = new ActionRowBuilder().addComponents(
|
||||||
new StringSelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
.setCustomId('bcsSelect')
|
.setCustomId('pronounSelect')
|
||||||
.setPlaceholder('Select your BCS status')
|
.setPlaceholder('Select your pronouns')
|
||||||
.addOptions(
|
.addOptions(
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Student Member')
|
.setLabel('He/Him')
|
||||||
.setValue('bcsStudent'),
|
.setValue('HeHim'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Associate Member')
|
.setLabel('He/They')
|
||||||
.setValue('bcsASS'),
|
.setValue('HeThey'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Professional Member')
|
.setLabel('She/Her')
|
||||||
.setValue('bcsProf'),
|
.setValue('SheHers'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Fellow')
|
.setLabel('She/They')
|
||||||
.setValue('bcsFellow'),
|
.setValue('SheThey'),
|
||||||
)
|
new StringSelectMenuOptionBuilder()
|
||||||
)
|
.setLabel('They/Them')
|
||||||
|
.setValue('TheyThem'),
|
||||||
|
new StringSelectMenuOptionBuilder()
|
||||||
|
.setLabel('Ask My Pronouns')
|
||||||
|
.setValue('Ask'),
|
||||||
|
new StringSelectMenuOptionBuilder()
|
||||||
|
.setLabel('Any Pronouns')
|
||||||
|
.setValue('Any')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
const row4 = new ActionRowBuilder().addComponents(
|
const row3 = new ActionRowBuilder().addComponents(
|
||||||
new StringSelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
.setCustomId('miscSelect')
|
.setCustomId('bcsSelect')
|
||||||
.setPlaceholder('Select your misc roles')
|
.setPlaceholder('Select your BCS status')
|
||||||
.setMinValues(0)
|
.addOptions(
|
||||||
.setMaxValues(2)
|
new StringSelectMenuOptionBuilder()
|
||||||
.addOptions(
|
.setLabel('Student Member')
|
||||||
new StringSelectMenuOptionBuilder()
|
.setValue('bcsStudent'),
|
||||||
.setLabel('Events Ping')
|
new StringSelectMenuOptionBuilder()
|
||||||
.setDescription('Get notified of events')
|
.setLabel('Associate Member')
|
||||||
.setValue('events'),
|
.setValue('bcsASS'),
|
||||||
new StringSelectMenuOptionBuilder()
|
new StringSelectMenuOptionBuilder()
|
||||||
.setLabel('Coursework Help Ping')
|
.setLabel('Professional Member')
|
||||||
.setDescription('Be notified of coursework help within the coursework forum')
|
.setValue('bcsProf'),
|
||||||
.setValue('ACWPing'),
|
new StringSelectMenuOptionBuilder()
|
||||||
)
|
.setLabel('Fellow')
|
||||||
)
|
.setValue('bcsFellow')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
const row4 = new ActionRowBuilder().addComponents(
|
||||||
|
new StringSelectMenuBuilder()
|
||||||
|
.setCustomId('miscSelect')
|
||||||
|
.setPlaceholder('Select your misc roles')
|
||||||
|
.setMinValues(0)
|
||||||
|
.setMaxValues(2)
|
||||||
|
.addOptions(
|
||||||
|
new StringSelectMenuOptionBuilder()
|
||||||
|
.setLabel('Events Ping')
|
||||||
|
.setDescription('Get notified of events')
|
||||||
|
.setValue('events'),
|
||||||
|
new StringSelectMenuOptionBuilder()
|
||||||
|
.setLabel('Coursework Help Ping')
|
||||||
|
.setDescription(
|
||||||
|
'Be notified of coursework help within the coursework forum'
|
||||||
|
)
|
||||||
|
.setValue('ACWPing')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
interaction.channel.send({
|
||||||
|
content: 'Select your year.',
|
||||||
|
components: [row1],
|
||||||
interaction.channel.send({ content: 'Select your year.', components: [row1] });
|
});
|
||||||
interaction.channel.send({ content: 'Select your pronouns.', components: [row2] });
|
interaction.channel.send({
|
||||||
interaction.channel.send({ content: 'Select your BCS status.', components: [row3] });
|
content: 'Select your pronouns.',
|
||||||
interaction.channel.send({ content: 'Select your misc roles.', components: [row4] });
|
components: [row2],
|
||||||
|
});
|
||||||
|
interaction.channel.send({
|
||||||
|
content: 'Select your BCS status.',
|
||||||
|
components: [row3],
|
||||||
|
});
|
||||||
|
interaction.channel.send({
|
||||||
|
content: 'Select your misc roles.',
|
||||||
|
components: [row4],
|
||||||
|
});
|
||||||
|
|
||||||
interaction.reply({ content: 'Dropdowns sent sent.', ephemeral: true });
|
interaction.reply({ content: 'Dropdowns sent sent.', ephemeral: true });
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { MessageEmbed } = require('discord.js');
|
const { EmbedBuilder } = require('discord.js');
|
||||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -24,15 +24,15 @@ module.exports = {
|
||||||
|
|
||||||
const Responses = ['Yes', 'No', 'Maybe', 'It is likely', 'It is unlikely'];
|
const Responses = ['Yes', 'No', 'Maybe', 'It is likely', 'It is unlikely'];
|
||||||
|
|
||||||
const embed = new MessageEmbed()
|
const embed = new EmbedBuilder()
|
||||||
.setColor('GREEN')
|
.setColor(0x3fb618)
|
||||||
.setFooter({ text: `Called By: ${interaction.user.tag}` })
|
.setFooter({ text: `Called By: ${interaction.user.tag}` })
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setTitle('8ball')
|
.setTitle('8ball')
|
||||||
.addField(
|
.addFields({
|
||||||
`${questionToSend}`,
|
name: `${questionToSend}`,
|
||||||
`${Responses[Math.floor(Math.random() * Responses.length)]}`
|
value: `${Responses[Math.floor(Math.random() * Responses.length)]}`,
|
||||||
);
|
});
|
||||||
interaction.reply({ embeds: [embed] });
|
interaction.reply({ embeds: [embed] });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue