Merge pull request #63 from IDeletedSystem64/stable
Apply hotfix to dev
This commit is contained in:
commit
bd2a028370
|
@ -1,6 +1,6 @@
|
|||
|
||||
# Anitrox Dev Branch (anitrox_unstable)
|
||||
This is the development branch for Anitrox, If you want those fresh hot Anitrox builds right from the oven, you've come to the right place!
|
||||
# Anitrox Stable Branch (anitrox_stable)
|
||||
This is the stable branch, If you want the prepackaged and prepared builds, you're at the right place.
|
||||
# Dependencies to get started
|
||||
To begin, you will need to satisfy the following dependencies:
|
||||
Node.JS: 14
|
||||
|
|
|
@ -8,10 +8,10 @@ function Uptime (uptime) {
|
|||
|
||||
const daystring = days + (days === 1 ? ' day' : ' days');
|
||||
const hourstring = hours + (hours === 1 ? ' hour' : ' hours');
|
||||
const minutetring = minutes + (minutes === 1 ? ' minute' : ' minutes');
|
||||
const minutestring = minutes + (minutes === 1 ? ' minute' : ' minutes');
|
||||
const secondstring = seconds + (seconds === 1 ? ' second' : ' seconds');
|
||||
|
||||
return `${daystring}**, **${hourstring}**, **${minutetring}**, **${secondstring}`;
|
||||
return `${daystring}**, **${hourstring}**, **${minutestring}**, **${secondstring}`;
|
||||
}
|
||||
|
||||
const os = require('os');
|
||||
|
|
|
@ -47,22 +47,8 @@ module.exports = {
|
|||
|
||||
return returnMessage;
|
||||
} else {
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<:AnitroxDenied:809651936642203668> **403 Forbidden**',
|
||||
color: 13632027,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: '**What Happened?**',
|
||||
value: "You don't have the appropriate permissions to run this command!"
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
console.error(`[SYSTEM] [ERR] User ${user.username} tried to reload ${args[0]}, but doesn't have permission!`);
|
||||
return client.generateErrorMessage("You don't have permission to run this command.", user.displayAvatarURL());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
} catch (e) { console.error(e); }
|
||||
} else {
|
||||
console.error('[SYSTEM] [ERR] User ' + user.username + " tried to restart the bot, but doesn't have permission! If this was you, Check your config.json");
|
||||
return client.generateErrorMessage('Only the bot owner can restart the bot! Stop.', user.displayAvatarURL());
|
||||
await channel.send(client.generateErrorMessage('You do not have permission to run this command.', user.displayAvatarURL()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,32 +5,31 @@ module.exports = {
|
|||
options: [],
|
||||
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(await this.handle(client, config, message.author));
|
||||
process.exit();
|
||||
await this.handle(client, config, message.author, message.channel);
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(await this.handle(client, config, interaction.user));
|
||||
process.exit();
|
||||
await this.handle(client, config, interaction.user, interaction.channel);
|
||||
},
|
||||
|
||||
async handle (client, config, user) {
|
||||
async handle (client, config, user, channel) {
|
||||
if (user.id === config.ownerID) {
|
||||
console.log('[SYSTEM] [INFO] ' + ` The bot is going down for shut down. \nShutdown requested by ${user.username}`);
|
||||
return {
|
||||
console.log('[SYSTEM] [INFO] ' + `The bot is going down for shut down. \nShutdown requested by ${user.username}`);
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
title: '**Shut down the bot**',
|
||||
description: '<a:AnitroxWorking:697147309531594843> **Shutting Down...**',
|
||||
description: ':AnitroxWorking: **Shutting Down...**',
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}]
|
||||
};
|
||||
});
|
||||
process.exit();
|
||||
} else {
|
||||
console.error('[SYSTEM] [ERR] User ' + user.username + " tried to shut down the bot, but doesn't have permission! If this was you, Check your config.json");
|
||||
return client.generateErrorMessage('Only the bot owner can stop the bot! Stop.', user.displayAvatarURL());
|
||||
await channel.send(client.generateErrorMessage('You do not have permission to run this command.', user.displayAvatarURL()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
"prefix": "n!",
|
||||
"token": "IM SO EXCITED ABOUT BURGER",
|
||||
"ownerID": "MY FAVORITE COLOR IS TWELVE",
|
||||
"release": "anitrox_dev",
|
||||
"build": "Stable",
|
||||
"release": "Stable Release",
|
||||
"build": "1.2.2",
|
||||
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022",
|
||||
"sandbox": {
|
||||
"enabled": false,
|
||||
"id": "788391989460205571",
|
||||
"id": "793537380330111028",
|
||||
"refreshLocal": false,
|
||||
"refreshGlobal": false
|
||||
},
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
Reference in New Issue