nyx/commands/Utilities/choose.js
2021-06-24 15:53:19 +08:00

15 lines
587 B
JavaScript

const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "choose",
aliases: ["random", "8ball"],
description: "Choose random things",
usage: "(Choices)",
category: "Utilities",
run: async (client, message, args) => {
const split = args.join(" ").split(" ");
if (!split) return client.err(message, "Utilities", "choose", 0);
if (!split[1]) return client.err(message, "Utilities", "choose", 101);
let choices = split[Math.floor(Math.random() * split.length)];
message.channel.send(`I will choose - \`${choices}\``);
},
};