-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.js
More file actions
83 lines (73 loc) · 2.26 KB
/
functions.js
File metadata and controls
83 lines (73 loc) · 2.26 KB
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
81
82
83
const { MessageEmbed } = require("discord.js");
const colors = require("colors");
const client = require(".")
const ee = require("./settings/embed.json");
async function logger(cid, embed) {
try {
//paste same pvt channelid here
const log = client.channels.cache.get("1110881335087743106")
await log.send({embeds:[embed]})
} catch (error) {
console.log(colors.red(error))
}
}
function successEmbed(title, description) {
try {
let embed = new MessageEmbed()
.setAuthor({name: `${title}`, iconURL: "https://cdn.discordapp.com/emojis/982377244439760986.webp?size=128&quality=lossless"})
.setTitle(`${title}`)
.setDescription(`${description}`)
.setColor(ee.embed_color)
.setFooter({text: "Friskkkk", iconURL: ee.embed_footericon});
return embed;
} catch (error) {
console.log(colors.red(error))
}
}
function failEmbed(title, description) {
try {
let embed = new MessageEmbed()
.setAuthor({name: `${title}`, iconURL: 'https://cdn.discordapp.com/emojis/982377277801234452.webp?size=128&quality=lossless'})
.setDescription(`${description}`)
.setColor(ee.embed_wrongcolor)
.setFooter({text: "Frisk", iconURL: ee.embed_footericon});
return embed;
} catch (error) {
console.log(colors.red(error))
}
}
function opEmbed(title, description, footer) {
try {
let embed = new MessageEmbed()
.setAuthor({name: "Frisk", iconURL: ee.embed_footericon})
.setTitle(`${title}`)
.setDescription(`${description}`)
.setColor("#ffffff")
.setFooter({text: `${footer}`, iconURL: ee.embed_footericon});
return embed;
} catch (error) {
console.log(colors.red(error))
}
}
function randNum() {
let code = '';
let dict = '0123456789';
for(var i = 0; i < 6; i++){
code = code + dict.charAt(Math.floor(Math.random() * dict.length));
}
return code;
}
function randToken() {
let code = '';
let dict = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
for(var i = 0; i < 40; i++){
code = code + dict.charAt(Math.floor(Math.random() * dict.length));
}
return code;
}
module.exports.randToken = randToken;
module.exports.randNum = randNum;
module.exports.logger = logger;
module.exports.successEmbed = successEmbed;
module.exports.failEmbed = failEmbed;
module.exports.opEmbed = opEmbed;