Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimafia-bot committed Dec 17, 2023
1 parent dc753bb commit 3d35ece
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions Games/core/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,18 @@ module.exports = class Game {
}
}

async handleError (e) {
var stack = e.stack.split('\n').slice(0,6).join('\n');
async handleError(e) {
var stack = e.stack.split("\n").slice(0, 6).join("\n");
const discordAlert = JSON.parse(process.env.DISCORD_ERROR_HOOK);
await axios({
method: "post",
url: discordAlert.hook,
data: {
"content": `Error stack: \`\`\` ${stack}\`\`\`\nSetup: ${this.setup.name} (${this.setup.id})\nGame Link: ${process.env.BASE_URL}/game/${this.id}/review`,
"username": "Errorbot",
"attachments": [],
"thread_name": `Game Error! ${e}`
}
content: `Error stack: \`\`\` ${stack}\`\`\`\nSetup: ${this.setup.name} (${this.setup.id})\nGame Link: ${process.env.BASE_URL}/game/${this.id}/review`,
username: "Errorbot",
attachments: [],
thread_name: `Game Error! ${e}`,
},
});
}

Expand Down
14 changes: 7 additions & 7 deletions Games/core/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ module.exports = class Player {
delete this.anonId;
}

async handleError (e) {
var stack = e.stack.split('\n').slice(0,6).join('\n');
async handleError(e) {
var stack = e.stack.split("\n").slice(0, 6).join("\n");
const discordAlert = JSON.parse(process.env.DISCORD_ERROR_HOOK);
await axios({
method: "post",
url: discordAlert.hook,
data: {
"content": `Error stack: \`\`\` ${stack}\`\`\`\nSetup: ${this.game.setup.name} (${this.game.setup.id})\nGame Link: ${process.env.BASE_URL}/game/${this.game.id}/review`,
"username": "Errorbot",
"attachments": [],
"thread_name": `Game Error! ${e}`
}
content: `Error stack: \`\`\` ${stack}\`\`\`\nSetup: ${this.game.setup.name} (${this.game.setup.id})\nGame Link: ${process.env.BASE_URL}/game/${this.game.id}/review`,
username: "Errorbot",
attachments: [],
thread_name: `Game Error! ${e}`,
},
});
}

Expand Down

0 comments on commit 3d35ece

Please sign in to comment.