Merge pull request #63 from IDeletedSystem64/stable

Apply hotfix to dev
This commit is contained in:
Sophie Marie 2022-07-03 18:22:26 -05:00 committed by GitHub
commit bd2a028370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 34 deletions

View File

@ -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

View File

@ -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');

View File

@ -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());
}
}
};

View File

@ -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()));
}
}
};

View File

@ -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()));
}
}
};

View File

@ -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
},

1
embeds.json Normal file
View File

@ -0,0 +1 @@