ok i think everything is good now
This commit is contained in:
1 parent
f5ad0ce38f
commit
fafdc5de9b
1 file changed
+10
-4
+10
-4
@@ -1037,8 +1037,11 @@ async function sendLockerImageEmbed(message, { title, description, imageBuffer,
|
|||||||
: String(title || 'Locker Check');
|
: String(title || 'Locker Check');
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(0xcccccc)
|
.setColor(0xcccccc)
|
||||||
.setAuthor(`${displayName} (${author})`)
|
.setAuthor({
|
||||||
.setDescription(description)
|
name: `${displayName} (${message.author.username})`,
|
||||||
|
iconURL: message.author.displayAvatarURL()
|
||||||
|
})
|
||||||
|
.setDescription(`**${title}**\n${description}`)
|
||||||
.setImage(`attachment://${fileName}`)
|
.setImage(`attachment://${fileName}`)
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: `1-800 @ ${message.guild.name}`,
|
text: `1-800 @ ${message.guild.name}`,
|
||||||
@@ -2145,7 +2148,7 @@ client.on('messageCreate', async (message) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//await message.author.send(`Building your full locker (${categories.length} categories)...`);
|
//await message.author.send(`Building your full locker (${categories.length} categories)...`);
|
||||||
await message.author.send({
|
let building_msg = await message.author.send({
|
||||||
content: null, embeds: [{
|
content: null, embeds: [{
|
||||||
color: 0xcccccc,
|
color: 0xcccccc,
|
||||||
title: '',
|
title: '',
|
||||||
@@ -2179,15 +2182,18 @@ client.on('messageCreate', async (message) => {
|
|||||||
|
|
||||||
if (img) {
|
if (img) {
|
||||||
await sendLockerImageEmbed(message, {
|
await sendLockerImageEmbed(message, {
|
||||||
title: `${displayName} - ${cat.label}`,
|
title: `${cat.label}`,
|
||||||
description: cat.subtitle,
|
description: cat.subtitle,
|
||||||
imageBuffer: img,
|
imageBuffer: img,
|
||||||
fileName: `${cat.label.toLowerCase().replace(/\s/g, '_')}.png`,
|
fileName: `${cat.label.toLowerCase().replace(/\s/g, '_')}.png`,
|
||||||
|
author: message.author.username,
|
||||||
|
displayName: displayName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await new Promise(r => setTimeout(r, 500));
|
await new Promise(r => setTimeout(r, 500));
|
||||||
}
|
}
|
||||||
|
building_msg.delete();
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('locker image error:', err.message);
|
console.error('locker image error:', err.message);
|
||||||
|
|||||||
Reference in new issue
Block a user