-
Notifications
You must be signed in to change notification settings - Fork 2
/
util.js
20 lines (18 loc) · 829 Bytes
/
util.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const { MessageEmbed } = require('discord.js');
exports.shuffle = (array) => {
let currentIndex = array.length, randomIndex;
while (currentIndex != 0) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex--;
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
}
return array;
}
exports.embed = ({ color = '#5865F2', interaction }) => {
return new MessageEmbed()
.setColor(color)
.setTitle("Choose The Correct Button")
.setDescription("Vote for the server by clicking the button that\n is the same as the text in the picture, this process will be\n canceled after **60 seconds**.").setAuthor(interaction.user.username, interaction.user.avatarURL(), "https://github.com/berkaltiok")
.setFooter("Discord Captcha Bot")
.setTimestamp()
}