change all indentation to spaces
This commit is contained in:
parent
7bfbe0a021
commit
2206af796a
5 changed files with 45 additions and 45 deletions
|
@ -2,10 +2,10 @@ const { inspect } = require("util");
|
|||
|
||||
module.exports = {
|
||||
|
||||
name: 'eval',
|
||||
description: 'Runs js code',
|
||||
async execute(_, message, args, footerTxt) {
|
||||
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
|
||||
name: 'eval',
|
||||
description: 'Runs js code',
|
||||
async execute(_, message, args, footerTxt) {
|
||||
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
|
||||
try {
|
||||
const code = args.join(" ");
|
||||
const evaled = inspect(eval(code));
|
||||
|
|
|
@ -2,9 +2,9 @@ const {build, release} = require('../config.json');
|
|||
|
||||
module.exports = {
|
||||
|
||||
name: 'info',
|
||||
description: 'Shows bot and host information',
|
||||
async execute(client, message, _, footerTxt) {
|
||||
name: 'info',
|
||||
description: 'Shows bot and host information',
|
||||
async execute(client, message, _, footerTxt) {
|
||||
|
||||
function Uptime(uptime) {
|
||||
const totalSeconds = (uptime / 1000);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module.exports = {
|
||||
|
||||
name: 'invite',
|
||||
description: 'Add Anitrox to your beautiful server!',
|
||||
syntax: [],
|
||||
async execute(_0, message, _1, footerTxt) {
|
||||
name: 'invite',
|
||||
description: 'Add Anitrox to your beautiful server!',
|
||||
syntax: [],
|
||||
async execute(_0, message, _1, footerTxt) {
|
||||
await message.channel.send({embed: {
|
||||
"title": "Add Anitrox to your Server!",
|
||||
"description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.",
|
||||
|
@ -30,5 +30,5 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
}});
|
||||
},
|
||||
},
|
||||
};
|
|
@ -1,8 +1,8 @@
|
|||
module.exports = {
|
||||
name: 'reload',
|
||||
description: 'Reloads a command',
|
||||
async execute(client, message, args, footerTxt) {
|
||||
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
|
||||
name: 'reload',
|
||||
description: 'Reloads a command',
|
||||
async execute(client, message, args, footerTxt) {
|
||||
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
|
||||
if (!args.length) {
|
||||
await message.channel.send(client.generateErrorMessage("You forgot to provide anything to reload, you pillock",message.author.displayAvatarURL()));
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
}});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
54
start.js
54
start.js
|
@ -11,8 +11,8 @@ client.commands = new Discord.Collection();
|
|||
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`./commands/${file}`);
|
||||
client.commands.set(command.name, command);
|
||||
const command = require(`./commands/${file}`);
|
||||
client.commands.set(command.name, command);
|
||||
}
|
||||
|
||||
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("warn", (e) => (`[WARN] ${warn(e)}`));
|
||||
client.once('ready', () => {
|
||||
console.clear()
|
||||
console.log(' ___ _ __ ');
|
||||
console.log(' / | ____ (_) /__________ _ __');
|
||||
console.log(' / /| | / __ \\/ / __/ ___/ __ \\| |/_/');
|
||||
console.log(' / ___ |/ / / / / /_/ / / /_/ /> < ');
|
||||
console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ');
|
||||
console.log(`${release}, ${build}`);
|
||||
console.log("All Systems Go. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!");
|
||||
console.clear()
|
||||
console.log(' ___ _ __ ');
|
||||
console.log(' / | ____ (_) /__________ _ __');
|
||||
console.log(' / /| | / __ \\/ / __/ ___/ __ \\| |/_/');
|
||||
console.log(' / ___ |/ / / / / /_/ / / /_/ /> < ');
|
||||
console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ');
|
||||
console.log(`${release}, ${build}`);
|
||||
console.log("All Systems Go. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!");
|
||||
});
|
||||
|
||||
|
||||
setInterval(async () => {
|
||||
// Picks a status from the config file
|
||||
const index = Math.floor(Math.random() * statuses.length);
|
||||
await client.user.setActivity(statuses[index]);
|
||||
const index = Math.floor(Math.random() * statuses.length);
|
||||
await client.user.setActivity(statuses[index]);
|
||||
}, 20000);
|
||||
|
||||
// Begin Command Handler
|
||||
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 command = args.shift().toLowerCase();
|
||||
|
||||
if (!client.commands.has(command)) return;
|
||||
const args = message.content.slice(prefix.length).split(/ +/);
|
||||
const command = args.shift().toLowerCase();
|
||||
|
||||
if (!client.commands.has(command)) return;
|
||||
|
||||
try {
|
||||
await client.commands.get(command).execute(client, message, args, footerTxt);
|
||||
} catch (error) {
|
||||
console.stack;
|
||||
message.channel.send({embed: {
|
||||
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
|
||||
"description": error.stack,
|
||||
"color": 13632027,
|
||||
try {
|
||||
await client.commands.get(command).execute(client, message, args, footerTxt);
|
||||
} catch (error) {
|
||||
console.stack;
|
||||
message.channel.send({embed: {
|
||||
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
|
||||
"description": error.stack,
|
||||
"color": 13632027,
|
||||
"footer": {
|
||||
"icon_url": message.author.displayAvatarURL(),
|
||||
"text": footerTxt
|
||||
},
|
||||
}});
|
||||
}
|
||||
}});
|
||||
}
|
||||
});
|
||||
|
||||
client.login(token);
|
Reference in a new issue