blob: 2ff39046e4de7069e828003e5864d261e29bf17f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import { Command } from 'discord-akairo';
import { Message } from 'discord.js';
import * as EightBallResponses from '../../json/8ball.json'
import { colour } from '../../Config';
export default class EightBallMinigames extends Command {
public constructor() {
super('8ball', {
aliases: ['8ball', '8b', '8-ball', '8-b'],
category: 'minigames',
description: {
content: 'Shake the magic 8 Ball for a fortune!',
usage: '[question]',
examples: [
'will I ever get married?'
]
},
ratelimit: 3
});
}
public exec(msg: Message): Promise<Message> {
let randomResponse = EightBallResponses.standard[Math.floor(Math.random() * EightBallResponses.standard.length)];
const embed = this.client.util.embed()
.setColor(colour)
.setAuthor('The 8-ball says',
'https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/8-Ball_Pool.svg/500px-8-Ball_Pool.svg.png')
.setDescription(`\`${randomResponse}\``);
return msg.channel.send(embed);
}
}
|