Merge branch 'ptb' into dev

This commit is contained in:
Anthony M 2021-02-06 12:22:35 -06:00 committed by GitHub
commit e0e97ba25d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 97 additions and 95 deletions

192
start.js
View File

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