Ok that was that way for a reason
This commit is contained in:
parent
29851ceb98
commit
51d6671089
69
index.js
69
index.js
|
@ -342,40 +342,6 @@ app.post("/report/:psk", (req, res) => {
|
|||
],
|
||||
"timestamp": new Date(dataFeilds["UTC Timestamp"])
|
||||
}
|
||||
],
|
||||
components: [
|
||||
{
|
||||
type: 1,
|
||||
components: [
|
||||
{
|
||||
type: 2,
|
||||
style: 1,
|
||||
label: "Acknowledge",
|
||||
custom_id: `acknowledge;${row.id}`
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
style: 3,
|
||||
label: "Close (Action Taken)",
|
||||
custom_id: `action;${row.id}`,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
style: 2,
|
||||
label: "Close (No Action)",
|
||||
custom_id: `close;${row.id}`,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
style: 4,
|
||||
label: "Mark as False Report",
|
||||
custom_id: `ignore;${row.id}`,
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -386,6 +352,41 @@ app.post("/report/:psk", (req, res) => {
|
|||
console.error(`${colors.red("[ERROR]")} ${colors.red(`An error occurred while handling a report: ${err}`)}`);
|
||||
return res.status(500).send({ error: "An error occurred while handling the report" });
|
||||
}
|
||||
newMsgData.components = [
|
||||
{
|
||||
type: 1,
|
||||
components: [
|
||||
{
|
||||
type: 2,
|
||||
style: 1,
|
||||
label: "Acknowledge",
|
||||
custom_id: `acknowledge;${row.id}`
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
style: 3,
|
||||
label: "Close (Action Taken)",
|
||||
custom_id: `action;${row.id}`,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
style: 2,
|
||||
label: "Close (No Action)",
|
||||
custom_id: `close;${row.id}`,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
style: 4,
|
||||
label: "Mark as False Report",
|
||||
custom_id: `ignore;${row.id}`,
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
msg.edit(msgData);
|
||||
});
|
||||
}); // Always do this just in case db fails
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue