This repository has been archived by the owner on Jan 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
65 lines (55 loc) · 2.24 KB
/
index.js
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
const express = require('express')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World')
})
app.listen(3000)
require("./cmds/blurpletest")
const Discord = require("discord.js")
const { GCommands } = require("gcommands")
const client = new Discord.Client({
intents: Discord.Intents.ALL
});
const fs = require('fs');
client.on("ready", () => {
new GCommands(client, {
unkownCommandMessage: false,
cmdDir: "cmds/",
language: "english",
slash: {
slash: 'true',
prefix: 'QPWEPOJCKKCJNKCNKLYBNCMBEQWIOQWHEIQWEUIODHASKFHKASFHASKF'
},
defaultCooldown: 3
})
setInterval(() => {
autoAvatar()
}, 7200000)
autoAvatar()
client.user.setPresence({ activities: [{ name: 'candyfier', type: "COMPETING" }], status: "idle" });
})
client.on("gDebug",(debug)=>{console.log(debug)})
client.login(process.env.token)
async function autoAvatar() {
var json = fs.readFileSync("./autoavatar.txt");
if(json.last < Date.now()) {
let avatars = [
"https://cdn.discordapp.com/attachments/839570713220218913/843086224025845780/fuschia.png", // Fuschia
"https://cdn.discordapp.com/attachments/843082289814044682/843085609274441738/blurple.png", // Blurple
"https://cdn.discordapp.com/attachments/839570713220218913/843087019373494282/green.png", // Green
"https://cdn.discordapp.com/attachments/839570713220218913/843087128421466112/red.png", // Red
"https://cdn.discordapp.com/attachments/839570713220218913/843087281417486366/yellow.png",// Yellow
"https://cdn.discordapp.com/attachments/839570713220218913/843445931219091486/new-blurple.png" //new blurple
];
client.user.setAvatar(avatars[json.avatar]);
//client.guilds.cache.get("839570713220218910").setIcon(avatars[json.avatar])
if (json.avatar === avatars.length - 1) json.avatar = -1; // přidá se tam +1 :d
let data = {
avatar: json.avatar + 1,
last: Date.now() + 7200000
}
fs.writeFileSync("./autoavatar.txt", JSON.stringify(data));
} else {
console.log("smola")
}
}