change all indentation to spaces

This commit is contained in:
Nathaniel Mason 2022-03-27 23:03:17 +01:00
parent 7bfbe0a021
commit 2206af796a
5 changed files with 45 additions and 45 deletions

View file

@ -2,10 +2,10 @@ const { inspect } = require("util");
module.exports = { module.exports = {
name: 'eval', name: 'eval',
description: 'Runs js code', description: 'Runs js code',
async execute(_, message, args, footerTxt) { async execute(_, message, args, footerTxt) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
try { try {
const code = args.join(" "); const code = args.join(" ");
const evaled = inspect(eval(code)); const evaled = inspect(eval(code));

View file

@ -2,9 +2,9 @@ const {build, release} = require('../config.json');
module.exports = { module.exports = {
name: 'info', name: 'info',
description: 'Shows bot and host information', description: 'Shows bot and host information',
async execute(client, message, _, footerTxt) { async execute(client, message, _, footerTxt) {
function Uptime(uptime) { function Uptime(uptime) {
const totalSeconds = (uptime / 1000); const totalSeconds = (uptime / 1000);

View file

@ -1,9 +1,9 @@
module.exports = { module.exports = {
name: 'invite', name: 'invite',
description: 'Add Anitrox to your beautiful server!', description: 'Add Anitrox to your beautiful server!',
syntax: [], syntax: [],
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footerTxt) {
await message.channel.send({embed: { await message.channel.send({embed: {
"title": "Add Anitrox to your Server!", "title": "Add Anitrox to your Server!",
"description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.", "description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.",
@ -30,5 +30,5 @@ module.exports = {
} }
] ]
}}); }});
}, },
}; };

View file

@ -1,8 +1,8 @@
module.exports = { module.exports = {
name: 'reload', name: 'reload',
description: 'Reloads a command', description: 'Reloads a command',
async execute(client, message, args, footerTxt) { async execute(client, message, args, footerTxt) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
if (!args.length) { if (!args.length) {
await message.channel.send(client.generateErrorMessage("You forgot to provide anything to reload, you pillock",message.author.displayAvatarURL())); await message.channel.send(client.generateErrorMessage("You forgot to provide anything to reload, you pillock",message.author.displayAvatarURL()));
} }
@ -43,6 +43,6 @@ module.exports = {
} }
] ]
}}); }});
} }
} }
}; };

View file

@ -11,8 +11,8 @@ client.commands = new Discord.Collection();
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) { for (const file of commandFiles) {
const command = require(`./commands/${file}`); const command = require(`./commands/${file}`);
client.commands.set(command.name, command); client.commands.set(command.name, command);
} }
client.generateErrorMessage = (errorMsg, messageAuthorURL) => ({embed: { client.generateErrorMessage = (errorMsg, messageAuthorURL) => ({embed: {
@ -33,47 +33,47 @@ client.generateErrorMessage = (errorMsg, messageAuthorURL) => ({embed: {
client.on("error", (e) => console.log(`[ERROR] ${error(e)}`)); client.on("error", (e) => console.log(`[ERROR] ${error(e)}`));
client.on("warn", (e) => (`[WARN] ${warn(e)}`)); client.on("warn", (e) => (`[WARN] ${warn(e)}`));
client.once('ready', () => { client.once('ready', () => {
console.clear() console.clear()
console.log(' ___ _ __ '); console.log(' ___ _ __ ');
console.log(' / | ____ (_) /__________ _ __'); console.log(' / | ____ (_) /__________ _ __');
console.log(' / /| | / __ \\/ / __/ ___/ __ \\| |/_/'); console.log(' / /| | / __ \\/ / __/ ___/ __ \\| |/_/');
console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); console.log(' / ___ |/ / / / / /_/ / / /_/ /> < ');
console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| '); console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ');
console.log(`${release}, ${build}`); console.log(`${release}, ${build}`);
console.log("All Systems Go. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!"); console.log("All Systems Go. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!");
}); });
setInterval(async () => { setInterval(async () => {
// Picks a status from the config file // Picks a status from the config file
const index = Math.floor(Math.random() * statuses.length); const index = Math.floor(Math.random() * statuses.length);
await client.user.setActivity(statuses[index]); await client.user.setActivity(statuses[index]);
}, 20000); }, 20000);
// Begin Command Handler // Begin Command Handler
client.on('message', async (message) => { client.on('message', async (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 {
await client.commands.get(command).execute(client, message, args, footerTxt); await client.commands.get(command).execute(client, message, args, footerTxt);
} catch (error) { } catch (error) {
console.stack; console.stack;
message.channel.send({embed: { message.channel.send({embed: {
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**", "title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
"description": error.stack, "description": error.stack,
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": footerTxt
}, },
}}); }});
} }
}); });
client.login(token); client.login(token);