safeeeee
safeeeee
DIAdiscord.js - Imagine an app
Created by safeeeee on 8/4/2023 in #djs-questions
Attaching local image file to embed
const imageFile = new AttachmentBuilder(`../../assets/war_ranks/${warRank}.png`, { name: `${warRank}.png` });

const embed= new EmbedBuilder()
.setTitle(`[${tag}] ${name}`)
.setDescription(`${desc}`)
.setThumbnail(`attachment://${imageFile.name}`);

await interaction.channel.send({ embeds: [embed], files: [imageFile] });
const imageFile = new AttachmentBuilder(`../../assets/war_ranks/${warRank}.png`, { name: `${warRank}.png` });

const embed= new EmbedBuilder()
.setTitle(`[${tag}] ${name}`)
.setDescription(`${desc}`)
.setThumbnail(`attachment://${imageFile.name}`);

await interaction.channel.send({ embeds: [embed], files: [imageFile] });
Errors:
CombinedError (2)
Received one or more errors

1 ValidationError > s.nullish
| Expected undefined or null
|
| Received:
| | 'attachment://Platinum 4.png'

2 ExpectedConstraintError > s.string.url
| Invalid URL
|
| Expected: expected to match a URL
|
| Received:
| | 'attachment://Platinum 4.png'
CombinedError (2)
Received one or more errors

1 ValidationError > s.nullish
| Expected undefined or null
|
| Received:
| | 'attachment://Platinum 4.png'

2 ExpectedConstraintError > s.string.url
| Invalid URL
|
| Expected: expected to match a URL
|
| Received:
| | 'attachment://Platinum 4.png'
35 replies
DIAdiscord.js - Imagine an app
Created by safeeeee on 7/25/2023 in #djs-questions
[WARNING] The command at C:\Users\.......\addalliance.js is missing a required "data" or "execute"..
index.js: https://sourceb.in/FGCNzQre9z addalliance.js: https://sourceb.in/adfWCh04hx deploy-commands.js: https://sourceb.in/xrmRL6CyDq when i use node deploy-commands.js in the terminal i get this warning and i have no clue why: [WARNING] The command at C:\Users........\addalliance.js is missing a required "data" or "execute" property. side note: when i remove the const { Alliances } = require('../../index.js'); line from addalliance.js the warning stops showing, but ive got no clue why.
33 replies
DIAdiscord.js - Imagine an app
Created by safeeeee on 7/22/2023 in #djs-questions
intellisense not working
when i write inv. it doesnt follow up with any suggestions, like url for example
156 replies