Skip to content

Commit 8235a13

Browse files
committed
New release
1 parent 37bb04b commit 8235a13

File tree

3 files changed

+9
-712
lines changed

3 files changed

+9
-712
lines changed

index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const fmt = {
2626
green: "\x1b[32m",
2727
reset: "\x1b[0m",
2828
};
29-
// To eliminate "lag" on command
29+
// Cache stats to eliminate "lag" on command
3030
setInterval(() => {
3131
si.cpuTemperature().then((data) => {
3232
client.cpu_temperature = data.main;
@@ -117,28 +117,25 @@ client.on("ready", async () => {
117117
if (!client.config.channel) {
118118
throw new Error("Invalid CHANNEL_ID in .env!");
119119
}
120-
121120
client.config.owner = await client.users.fetch(client.config.owner);
122121
if (!client.config.owner) {
123122
throw new Error("Invalid OWNER_ID in .env!");
124123
}
125-
126124
if (!client.config.channel.guild.me.permissionsIn(client.config.channel).has("VIEW_CHANNEL")) {
127125
throw new Error("Missing required permission VIEW_CHANNEL for channel specified in .env");
128126
}
129-
130127
if (!client.config.channel.guild.me.permissionsIn(client.config.channel).has("SEND_MESSAGES")) {
131128
throw new Error("Missing required permission SEND_MESSAGES for channel specified in .env");
132129
}
133-
134130
if (!client.config.channel.guild.me.permissionsIn(client.config.channel).has("MANAGE_WEBHOOKS")) {
135131
throw new Error("Missing required permission MANAGE_WEBHOOKS for channel specified in .env");
136132
}
137-
138133
if (!(await client.config.channel.fetchWebhooks()).size) await client.config.channel.createWebhook(client.config.owner.tag, { avatar: client.config.owner.displayAvatarURL({ format: "png" }) });
139134
console.log(chalk.cyan(chalk.bold(`[DISCORD] > Logged in as ${client.user.tag}`)));
135+
client.user.setActivity("all ports!", {
136+
type: "WATCHING",
137+
});
140138
});
141-
142139
process.stdin.on("data", (data) => exec(data.toString(), { terminal: true }));
143140

144141
client.login(client.config.token).catch(() => {

0 commit comments

Comments
 (0)