better error response
This commit is contained in:
8 files changed
+61
-61
No files matched your search
+16
-16
@@ -124,7 +124,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -149,7 +149,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -160,7 +160,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -190,7 +190,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -208,7 +208,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -220,7 +220,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -258,7 +258,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -302,7 +302,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -314,7 +314,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -334,7 +334,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -348,7 +348,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -371,7 +371,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -384,7 +384,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -416,7 +416,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -439,7 +439,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -452,7 +452,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
+2
-2
@@ -72,8 +72,8 @@ module.exports = {
|
||||
client.dbo.collection("inventories").updateOne(query, update, function (err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
+18
-18
@@ -114,8 +114,8 @@ module.exports = {
|
||||
.catch(err => {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -136,20 +136,20 @@ module.exports = {
|
||||
client.dbo.collection('inventories').updateOne({'inventory.userID': interaction.member.user.id}, {$push: {'inventory.items': firearm}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
}
|
||||
|
||||
let message = new MessageEmbed()
|
||||
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${firearm.weaponType}`)
|
||||
.setColor(client.config.EmbedColor);
|
||||
|
||||
return interaction.send({ embeds: [message] });
|
||||
});
|
||||
|
||||
let message = new MessageEmbed()
|
||||
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${firearm.weaponType}`)
|
||||
.setColor(client.config.EmbedColor);
|
||||
|
||||
return interaction.send({ embeds: [message] });
|
||||
|
||||
} else {
|
||||
// Add generic item to inventory
|
||||
|
||||
@@ -162,19 +162,19 @@ module.exports = {
|
||||
client.dbo.collection('inventories').updateOne({'inventory.userID': interaction.member.user.id}, {$push: {'inventory.items': item}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
}
|
||||
|
||||
let message = new MessageEmbed()
|
||||
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${item.name}`)
|
||||
.setColor(client.config.EmbedColor);
|
||||
|
||||
return interaction.send({ embeds: [message] });
|
||||
});
|
||||
|
||||
let message = new MessageEmbed()
|
||||
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${item.name}`)
|
||||
.setColor(client.config.EmbedColor);
|
||||
|
||||
return interaction.send({ embeds: [message] });
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -350,7 +350,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
+8
-8
@@ -86,8 +86,8 @@ module.exports = {
|
||||
client.dbo.collection("banking").insertOne(banking, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -99,8 +99,8 @@ module.exports = {
|
||||
client.dbo.collection("banking").updateOne({"account.userID":targetUserID},{$set:{"account.balance":newBalance}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -131,8 +131,8 @@ module.exports = {
|
||||
client.dbo.collection("banking").insertOne(banking, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -144,8 +144,8 @@ module.exports = {
|
||||
client.dbo.collection("banking").updateOne({"account.userID":targetUserID},{$set:{"account.balance":newBalance}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
+2
-2
@@ -69,8 +69,8 @@ module.exports = {
|
||||
.catch(err => {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
let embed = new MessageEmbed()
|
||||
.setTitle(err)
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
+10
-10
@@ -173,7 +173,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -197,7 +197,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -238,7 +238,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -271,7 +271,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -318,7 +318,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -351,7 +351,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -398,7 +398,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -420,7 +420,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -453,7 +453,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -465,7 +465,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
+4
-4
@@ -52,7 +52,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -89,7 +89,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -110,7 +110,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
@@ -121,7 +121,7 @@ module.exports = {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers`)
|
||||
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor("RED")
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
|
||||
Reference in new issue
Block a user