Compare commits
2 commits
911b3aac8e
...
99d996818b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99d996818b | ||
|
|
00fe44c380 |
|
|
@ -71,7 +71,7 @@ module.exports = (member, db, client) => {
|
||||||
}],
|
}],
|
||||||
files: row.attachments ? JSON.parse(row.attachments).map(file => ({
|
files: row.attachments ? JSON.parse(row.attachments).map(file => ({
|
||||||
attachment: path.join(__dirname, '../storage', file),
|
attachment: path.join(__dirname, '../storage', file),
|
||||||
name: file
|
name: `SPOILER_${file}`
|
||||||
})) : []
|
})) : []
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ const execute = async (interaction, db, client) => {
|
||||||
content: `User <@${user}> has been added to the bad actors list by <@${interaction.user.id}>.`,
|
content: `User <@${user}> has been added to the bad actors list by <@${interaction.user.id}>.`,
|
||||||
files: attachments.map(file => ({
|
files: attachments.map(file => ({
|
||||||
attachment: path.join(__dirname, '../../storage', file),
|
attachment: path.join(__dirname, '../../storage', file),
|
||||||
name: file
|
name: `SPOILER_${file}`
|
||||||
}))
|
}))
|
||||||
}).then(msg => {
|
}).then(msg => {
|
||||||
if (msg.channel.type == Discord.ChannelType.GuildAnnouncement) {
|
if (msg.channel.type == Discord.ChannelType.GuildAnnouncement) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ const execute = async (interaction, db, client) => {
|
||||||
fields: [
|
fields: [
|
||||||
{ name: "Reported By", value: `<@${row.reportedBy}>`, inline: true },
|
{ name: "Reported By", value: `<@${row.reportedBy}>`, inline: true },
|
||||||
{ name: "Comment", value: row.comment || "No comment provided", inline: false },
|
{ name: "Comment", value: row.comment || "No comment provided", inline: false },
|
||||||
{ name: "Timestamp", value: `<t:${Math.floor(new Date(row.timestamp)/1000)}>`, inline: true }
|
{ name: "Timestamp", value: `<t:${Math.floor(new Date(row.timestamp) / 1000)}>`, inline: true }
|
||||||
],
|
],
|
||||||
color: 0x00ff00
|
color: 0x00ff00
|
||||||
};
|
};
|
||||||
|
|
@ -21,7 +21,10 @@ const execute = async (interaction, db, client) => {
|
||||||
if (row.attachments) {
|
if (row.attachments) {
|
||||||
try {
|
try {
|
||||||
const attachments = JSON.parse(row.attachments);
|
const attachments = JSON.parse(row.attachments);
|
||||||
files = attachments.map(file => path.join(__dirname, '../../storage', file));
|
files = attachments.map(file => ({
|
||||||
|
attachment: path.join(__dirname, '../../storage', file),
|
||||||
|
name: `SPOILER_${file}`
|
||||||
|
}))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
files = [];
|
files = [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue