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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
module.exports = class RockPaperScissorsFun extends Command {
constructor(client) {
super(client, {
name: 'rockpaperscissors',
aliases: ['rps'],
group: 'fun',
memberName: 'rockpaperscissors',
description: '**[Disabled]** Play Rock, Paper Scissors.',
throttling: {
usages: 5,
duration: 30
},
examples: ['uwu!rockpaperscissors', 'uwu!rps'],
userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
});
}
async run(msg: CommandoMessage) {
// TODO: fix this
msg.reply('Command disabled.')
// const rock = '💎'
// const paper = '🧻'
// const scissors = '✂️'
// let embed = new MessageEmbed()
// .setAuthor(msg.author.tag, msg.author.displayAvatarURL())
// .setDescription('What would you like to choose?')
// .setColor(0xFFCC4D)
// .setTimestamp()
// const m = await msg.channel.send(embed)
// const react1 = await m.react(rock)
// const react2 = await m.react(paper)
// const react3 = await m.react(scissors)
// const chooseArr = [rock, paper, scissors]
// const randChoice = await chooseArr[Math.floor(Math.random() * chooseArr.length)]
// let collector = await m.createReactionCollector((reacted, user) => user.id === msg.author.id)
// collector.on('collect', async (reaction, user) => {
// let winEmb = new MessageEmbed()
// .setAuthor(msg.author.tag, msg.author.displayAvatarURL())
// .setDescription('You won!')
// .addField('Results:', `${reaction.emoji} vs ${randChoice}`)
// .setColor('GREEN')
// .setTimestamp()
// let tieEmb = new MessageEmbed()
// .setAuthor(msg.author.tag, msg.author.displayAvatarURL())
// .setDescription('You tied!')
// .addField('Results:', `${reaction.emoji} vs ${randChoice}`)
// .setColor(0xFFCC4D)
// .setTimestamp()
// let lostEmb = new MessageEmbed()
// .setAuthor(msg.author.tag, msg.author.displayAvatarURL())
// .setDescription('You lost!')
// .addField('Results:', `${reaction.emoji} vs ${randChoice}`)
// .setColor('RED')
// .setTimestamp()
// if ((reaction.emoji === rock && randChoice === scissors) || (reaction.emoji === paper && randChoice === rock) || (reaction.emoji === scissors && randChoice === paper)) {
// m.delete()
// msg.channel.send(winEmb)
// } else if (reaction.emoji === randChoice) {
// m.delete()
// msg.channel.send(tieEmb)
// } else {
// m.delete()
// msg.channel.send(lostEmb)
// }
// })
}
};
|