BOSSx
BOSSx
DIAdiscord.js - Imagine an app
Created by BOSSx on 8/16/2023 in #djs-questions
Snipe Command
This is the command: https://pastebin.com/bjBsV6Qb This is in my index.js:
client.snipes = new Map()
client.on('messageDelete', function(message, channel) {
client.snipes.set(message.channel.id, {
content: message.content,
author: message.author,
image: message.attachments.first() ? message.attachments.first().proxyURL : null
})
})
client.snipes = new Map()
client.on('messageDelete', function(message, channel) {
client.snipes.set(message.channel.id, {
content: message.content,
author: message.author,
image: message.attachments.first() ? message.attachments.first().proxyURL : null
})
})
This is my error:
D:\CITY\commands\snipe.js:11
const msg = client.snipes.get(interaction.channel.id);
^

TypeError: Cannot read properties of undefined (reading 'snipes')
at Object.execute (D:\CITY\commands\snipe.js:11:28)
at Object.execute (D:\CITY\events\interactionCreate.js:112:15)

Node.js v18.7.0
D:\CITY\commands\snipe.js:11
const msg = client.snipes.get(interaction.channel.id);
^

TypeError: Cannot read properties of undefined (reading 'snipes')
at Object.execute (D:\CITY\commands\snipe.js:11:28)
at Object.execute (D:\CITY\events\interactionCreate.js:112:15)

Node.js v18.7.0
10 replies
DIAdiscord.js - Imagine an app
Created by BOSSx on 8/10/2023 in #djs-questions
setAvatar() setInterval()
what would be too fast to update the avatar? i would like to make it as often as possible without getting ratelimited would every 15 minutes be too often?
30 replies
DIAdiscord.js - Imagine an app
Created by BOSSx on 1/26/2023 in #djs-questions
is it recommended that all embeds are placed in the index.js file?
and then i can just import them or whatever?
3 replies