/8ball + bug

master
Kit Kasune 3 years ago
parent 6f7a7b162c
commit 4a29ebba28
  1. 2
      commands/misc/userinfo.js
  2. 35
      slash/8ball.js

@ -40,6 +40,6 @@ module.exports = {
.addField('Donator?', tu.developer ? `Well, ${name} makes me work, so they're a supporter in my book!` : tu.donator ? 'Yes! They have donated or supported me in the past!' : 'No', true) .addField('Donator?', tu.developer ? `Well, ${name} makes me work, so they're a supporter in my book!` : tu.donator ? 'Yes! They have donated or supported me in the past!' : 'No', true)
.addField('Natsuki Staff Level', tu.developer ? 'Developer' : tu.admin ? 'Admin; Audit access to the bot' : tu.staff ? 'Staff; Support but with maintenance permissions' : tu.support ? 'Support; Answers tickets and help queries' : 'Member; Does not have a staff rank.', true); .addField('Natsuki Staff Level', tu.developer ? 'Developer' : tu.admin ? 'Admin; Audit access to the bot' : tu.staff ? 'Staff; Support but with maintenance permissions' : tu.support ? 'Support; Answers tickets and help queries' : 'Member; Does not have a staff rank.', true);
} }
return message.channel.send(infoembed); return message.channel.send({embeds: [infoembed]});
} }
}; };

@ -0,0 +1,35 @@
const {SlashCommand} = require('../util/slash');
const {SlashCommandBuilder} = require('@discordjs/builders');
const Discord = require('discord.js');
module.exports = (client) => {
return new SlashCommand('8ball', client,
new SlashCommandBuilder()
.setName('8ball')
.setDescription("Get a totally accurate and well-thought-out answer to your life's troubles.")
.addStringOption(option => {
return option.setName("question")
.setDescription("Your existential crisis.")
.setRequired(true);
})
.addBooleanOption(option => {
return option.setName("send")
.setDescription("Should I send the answer to the channel?");
}),
async (client, interaction) => {
const responses = [
/*Positive Responses*/ "Yes!", "I think so", "Possibly", "Certainly", "Definitely", "Absolutely", "Sure!", "Most Likely", "I believe so", "If you're asking for my honest opinion... yes"
/*Negative Responses*/ ,"No!", "I don't think so", "Probably not", "Impossible", "Nope", "Absolutely *not*", "Nah", "Doubt it", "I don't believe so", "If you're asking for my honest opinion... no"
/*Neutral Responses */ ,"Maybe", "I'm not sure", "I'll think about it", "Uhh Natsuki isn't here right now. I can take a message?", "I'm sure if you look deep within your heart, which is currently all over that tree, you'll find the answer", "I mean, if you think so...", "I don't have an opinion on that.", "I'll choose to remain silent."
];
return await interaction.reply({embeds: [new Discord.MessageEmbed()
.setAuthor("8ball Question", interaction.user.avatarURL())
.setDescription("**Question:** " + interaction.options.getString('question') + "\n**Answer:** " + responses[Math.floor(Math.random() * responses.length)])
.setColor("c375f0")
.setFooter(`Asked by ${interaction.guild ? interaction.member.displayName : interaction.user.username} | Natsuki`)
.setTimestamp()
], ephemeral: !interaction.options.getBoolean("send")});
}
);
};
Loading…
Cancel
Save