fix: Fix 8ball command

imgbot
KieranRobson 2023-08-21 15:32:24 +01:00
parent 76c6634c91
commit 1ffb82ee13
2 changed files with 112 additions and 112 deletions

View File

@ -3,7 +3,7 @@ const {
PermissionFlagsBits,
ActionRowBuilder,
StringSelectMenuBuilder,
StringSelectMenuOptionBuilder
StringSelectMenuOptionBuilder,
} = require('discord.js');
module.exports = {
@ -42,16 +42,11 @@ module.exports = {
new StringSelectMenuOptionBuilder()
.setLabel('Third Year')
.setValue('4'),
new StringSelectMenuOptionBuilder()
.setLabel('Masters')
.setValue('5'),
new StringSelectMenuOptionBuilder()
.setLabel('PhD')
.setValue('6'),
new StringSelectMenuOptionBuilder()
.setLabel('Graduate')
.setValue('7')
))
new StringSelectMenuOptionBuilder().setLabel('Masters').setValue('5'),
new StringSelectMenuOptionBuilder().setLabel('PhD').setValue('6'),
new StringSelectMenuOptionBuilder().setLabel('Graduate').setValue('7')
)
);
const row2 = new ActionRowBuilder().addComponents(
new StringSelectMenuBuilder()
@ -80,7 +75,7 @@ module.exports = {
.setLabel('Any Pronouns')
.setValue('Any')
)
)
);
const row3 = new ActionRowBuilder().addComponents(
new StringSelectMenuBuilder()
@ -98,9 +93,9 @@ module.exports = {
.setValue('bcsProf'),
new StringSelectMenuOptionBuilder()
.setLabel('Fellow')
.setValue('bcsFellow'),
)
.setValue('bcsFellow')
)
);
const row4 = new ActionRowBuilder().addComponents(
new StringSelectMenuBuilder()
@ -115,24 +110,29 @@ module.exports = {
.setValue('events'),
new StringSelectMenuOptionBuilder()
.setLabel('Coursework Help Ping')
.setDescription('Be notified of coursework help within the coursework forum')
.setValue('ACWPing'),
.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 pronouns.', components: [row2] });
interaction.channel.send({ content: 'Select your BCS status.', components: [row3] });
interaction.channel.send({ content: 'Select your misc roles.', components: [row4] });
interaction.channel.send({
content: 'Select your year.',
components: [row1],
});
interaction.channel.send({
content: 'Select your pronouns.',
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 });
},

View File

@ -1,4 +1,4 @@
const { MessageEmbed } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
@ -24,15 +24,15 @@ module.exports = {
const Responses = ['Yes', 'No', 'Maybe', 'It is likely', 'It is unlikely'];
const embed = new MessageEmbed()
.setColor('GREEN')
const embed = new EmbedBuilder()
.setColor(0x3fb618)
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.setTimestamp()
.setTitle('8ball')
.addField(
`${questionToSend}`,
`${Responses[Math.floor(Math.random() * Responses.length)]}`
);
.addFields({
name: `${questionToSend}`,
value: `${Responses[Math.floor(Math.random() * Responses.length)]}`,
});
interaction.reply({ embeds: [embed] });
},
};