PokeBot/commands/Fun/story.js

33 lines
1 KiB
JavaScript
Raw Normal View History

2018-02-24 14:25:33 -05:00
exports.run = async (bot, msg) => {
msg.guild.fetchMembers().then(guild =>
{
const membersList = guild.members.array();
const selectedUser1 = membersList[Math.floor(Math.random() * membersList.length)].user;
const selectedUser2 = membersList[Math.floor(Math.random() * membersList.length)].user;
const selectedUser3 = membersList[Math.floor(Math.random() * membersList.length)].user;
2018-02-24 14:14:13 -05:00
2018-02-24 14:25:33 -05:00
const stories =
2018-02-24 14:14:13 -05:00
[
2018-02-24 14:25:33 -05:00
'Story 1 Alee says it\'s coming soon!.',
`Story 2 ${selectedUser1.username} jumps into the window then ${selectedUser2.username} saves ${selectedUser1.username} and ${selectedUser3.username} claps.`,
2018-02-24 14:14:13 -05:00
];
2018-02-24 14:25:33 -05:00
const storySelected = [Math.floor(Math.random() * stories.length)];
2018-02-24 20:16:05 -05:00
const embed = new Discord.RichEmbed()
2018-02-24 20:27:58 -05:00
.setColor(0x00ae86)
.setTitle('Pokebot Storytime')
.setDescription(stories[storySelected])
.setFooter('PokeBot Beta');
2018-02-24 20:17:06 -05:00
msg.channel.send(embed);
2018-02-24 14:25:33 -05:00
});
2018-02-24 14:14:13 -05:00
};
exports.conf = {
2018-02-24 14:25:33 -05:00
aliases: [],
guildOnly: true,
};
exports.help = {
name: 'story',
description: 'Tells you a story.',
};