start now clears console on successful startup

This commit is contained in:
Anthony M 2021-02-11 21:39:01 -06:00 committed by GitHub
parent 264f57ac53
commit 726b4d7c73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 96 additions and 97 deletions

193
start.js
View File

@ -1,97 +1,96 @@
console.log('Preparing to start!') console.log('Preparing to start!')
const fs = require('fs'); const fs = require('fs');
const Discord = require('discord.js'); const Discord = require('discord.js');
const { prefix, token } = require('./config.json'); const { prefix, token } = require('./config.json');
const os = require("os"); const os = require("os");
const version = "build 467";
const version = "build 465"; const release = "anitrox_ptb"
const activities_list = [
const release = "anitrox_ptb" "with np!help",
const activities_list = [ "Where am I?",
"with np!help", "with Sylveons!",
"Where am I?", "on my host's hard disk",
"with Sylveons!", "with Sophie",
"on my host's hard disk", "HAAAAAAAAPPPPPPPYYYYYYYYYYYYYYYYYYYY",
"with Sophie", "Running on " + process.platform + " / " + os.version() + "!",
"HAAAAAAAAPPPPPPPYYYYYYYYYYYYYYYYYYYY", "with the tea machine",
"Running on " + process.platform + " / " + os.version() + "!", "with Borked Computers",
"with the tea machine", "on Sophie's main PC- wait shoot she's coming",
"with Borked Computers", "btw I use Debian linux",
"on Sophie's main PC- wait shoot she's coming", "Watching you",
"btw I use Debian linux", "Running " + release + " Version " + version,
"Watching you", "in Incognito Mode- wait what",
"Running " + release + " Version " + version, "uwu",
"in Incognito Mode- wait what", "Team Fortress 2 with Sophie",
"uwu", "videos on Hulu",
"Team Fortress 2 with Sophie", "American Truck Simulator",
"videos on Hulu", "with my users!",
"American Truck Simulator", "with Sophies skirt"
"with my users!", ];
"with Sophies skirt"
]; console.log('Starting! This should only take a moment.')
const client = new Discord.Client();
console.log('Starting! This should only take a moment.') client.commands = new Discord.Collection();
const client = new Discord.Client(); const footicon = "https://cdn.discordapp.com/attachments/803658122299572255/805506708352008232/system64.png"
client.commands = new Discord.Collection(); const footer = "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
const footicon = "https://cdn.discordapp.com/attachments/803658122299572255/805506708352008232/system64.png"
const footer = "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); for (const file of commandFiles) {
const command = require(`./commands/${file}`);
for (const file of commandFiles) { client.commands.set(command.name, command);
const command = require(`./commands/${file}`); }
client.commands.set(command.name, command);
} client.on("error", (e) => console.error(e));
client.on("warn", (e) => console.warn(e));
client.on("error", (e) => console.error(e));
client.on("warn", (e) => console.warn(e)); client.once('ready', () => {
console.clear()
client.once('ready', () => { console.log(' ___ _ __ ');
console.log(' ___ _ __ '); console.log(' / | ____ (_) /__________ _ __');
console.log(' / | ____ (_) /__________ _ __'); console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/');
console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/'); console.log(' / ___ |/ / / / / /_/ / / /_/ /> < ');
console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ')
console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ')
console.log('All Systems Go. | Anitrox (C) 2021 IDeletedSystem64.');
console.log('All Systems Go. | Anitrox (C) 2021 IDeletedSystem64.'); });
}); setInterval(() => {
setInterval(() => { const index = Math.floor(Math.random() * (activities_list.length - 1) + 1);
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); client.user.setActivity(activities_list[index]);
client.user.setActivity(activities_list[index]); }, 20000);
}, 20000);
client.on('message', message => {
client.on('message', message => { if (!message.content.startsWith(prefix) || message.author.bot) return;
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const args = message.content.slice(prefix.length).split(/ +/); const command = args.shift().toLowerCase();
const command = args.shift().toLowerCase();
if (!client.commands.has(command)) return;
if (!client.commands.has(command)) return;
try {
try { client.commands.get(command).execute(client, message, args);
client.commands.get(command).execute(client, message, args); } catch (error) {
} catch (error) { console.error
console.error const embed = {
const embed = { "title": "<:NyabotError:697145462347661412> **Well that happened...**",
"title": "<:NyabotError:697145462347661412> **Well that happened...**", "color": 13632027,
"color": 13632027, "footer": {
"footer": { "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved."
"text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved." },
}, "fields": [
"fields": [ {
{ "name": "**What Happened?**",
"name": "**What Happened?**", "value": "The command you tried to run failed to execute due to an error."
"value": "The command you tried to run failed to execute due to an error." },
}, {
{ "name": "Error Info",
"name": "Error Info", "value": error.message
"value": error.message }
} ]
] };
}; message.channel.send({ embed });
message.channel.send({ embed }); }
} });
});
client.login(token);
client.login(token);