Update stable to 1.2.1

1.2.1 hotfix
This commit is contained in:
Sophie Marie 2022-07-03 18:20:37 -05:00 committed by GitHub
commit c6170b5caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 32 deletions

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