Skip to content

Commit

Permalink
comply to character limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic-R committed Jul 25, 2024
1 parent fd97398 commit 812d82f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/clear_database.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require("dotenv").config();
module.exports = {
command: {
name: "cleardatabase",
description: "This IRRECOVERABLY deletes the contents of the BUILD table and RESETS all points to 0 (all users are preserved)",
description: "This PERMANENTLY deletes the contents of the BUILD table and RESETS all points (all users are saved)",
options: [
{
name: "sure",
Expand Down Expand Up @@ -34,14 +34,14 @@ module.exports = {
});
}
if (interaction.options.getBoolean("backup")) {
// Backup the database as a json and send it to the user in the message as a file
const backup = JSON.stringify(builds);
const fs = require("fs");
fs.writeFileSync("backup.json", backup);
interaction.user.send({
content: "Here is your backup.",
files: ["backup.json"],
});
fs.rmSync("backup.json");
}
});
prisma.build.deleteMany().then(() => {
Expand Down

0 comments on commit 812d82f

Please sign in to comment.