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) # Anitrox Stable Branch (anitrox_stable)
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! This is the stable branch, If you want the prepackaged and prepared builds, you're at the right place.
# Dependencies to get started # Dependencies to get started
To begin, you will need to satisfy the following dependencies: To begin, you will need to satisfy the following dependencies:
Node.JS: 14 Node.JS: 14

View file

@ -8,10 +8,10 @@ function Uptime (uptime) {
const daystring = days + (days === 1 ? ' day' : ' days'); const daystring = days + (days === 1 ? ' day' : ' days');
const hourstring = hours + (hours === 1 ? ' hour' : ' hours'); 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'); const secondstring = seconds + (seconds === 1 ? ' second' : ' seconds');
return `${daystring}**, **${hourstring}**, **${minutetring}**, **${secondstring}`; return `${daystring}**, **${hourstring}**, **${minutestring}**, **${secondstring}`;
} }
const os = require('os'); const os = require('os');

View file

@ -47,22 +47,8 @@ module.exports = {
return returnMessage; return returnMessage;
} else { } else {
return { console.error(`[SYSTEM] [ERR] User ${user.username} tried to reload ${args[0]}, but doesn't have permission!`);
embeds: [{ return client.generateErrorMessage("You don't have permission to run this command.", user.displayAvatarURL());
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!"
}
]
}]
};
} }
} }
}; };

View file

@ -43,7 +43,7 @@ module.exports = {
} catch (e) { console.error(e); } } catch (e) { console.error(e); }
} else { } 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"); 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: [], options: [],
async parseMessage (client, config, message) { async parseMessage (client, config, message) {
await message.channel.send(await this.handle(client, config, message.author)); await this.handle(client, config, message.author, message.channel);
process.exit();
}, },
async parseInteraction (client, config, interaction) { async parseInteraction (client, config, interaction) {
await interaction.reply(await this.handle(client, config, interaction.user)); await this.handle(client, config, interaction.user, interaction.channel);
process.exit();
}, },
async handle (client, config, user) { async handle (client, config, user, channel) {
if (user.id === config.ownerID) { if (user.id === config.ownerID) {
console.log('[SYSTEM] [INFO] ' + ` The bot is going down for shut down. \nShutdown requested by ${user.username}`); console.log('[SYSTEM] [INFO] ' + `The bot is going down for shut down. \nShutdown requested by ${user.username}`);
return { await channel.send({
embeds: [{ embeds: [{
title: '**Shut down the bot**', title: '**Shut down the bot**',
description: '<a:AnitroxWorking:697147309531594843> **Shutting Down...**', description: ':AnitroxWorking: **Shutting Down...**',
color: 9442302, color: 9442302,
footer: { footer: {
icon_url: user.displayAvatarURL(), icon_url: user.displayAvatarURL(),
text: config.footerTxt text: config.footerTxt
} }
}] }]
}; });
process.exit();
} else { } 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"); 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!", "prefix": "n!",
"token": "IM SO EXCITED ABOUT BURGER", "token": "IM SO EXCITED ABOUT BURGER",
"ownerID": "MY FAVORITE COLOR IS TWELVE", "ownerID": "MY FAVORITE COLOR IS TWELVE",
"release": "anitrox_dev", "release": "Stable Release",
"build": "Stable", "build": "1.2.2",
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022", "footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022",
"sandbox": { "sandbox": {
"enabled": false, "enabled": false,
"id": "788391989460205571", "id": "793537380330111028",
"refreshLocal": false, "refreshLocal": false,
"refreshGlobal": false "refreshGlobal": false
}, },

1
embeds.json Normal file
View file

@ -0,0 +1 @@