igzh
igzh
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by igzh on 5/25/2024 in #djs-questions
TypeError: user.permissionsIn is not a function
if (userData.notifications.luckypic === true) {
try {
const userEmbed = new EmbedBuilder()
.setTitle('Lottery: Luckypic')
.setColor('Green')
.addFields(
{ name: '**You got**', value: `${randomAmt}:wl:`, inline: false },
)
.setTimestamp();

const dmChannel = await user.createDM();
// Check if the bot has permission to send messages
if (user.permissionsIn(dmChannel).has("SEND_MESSAGES")) {
dmChannel.send({ embeds: [userEmbed] });
} else {
return false;
}
} catch (error) {
console.error(`Failed to send DM to user ${userIds}:`, error);
}
}
if (userData.notifications.luckypic === true) {
try {
const userEmbed = new EmbedBuilder()
.setTitle('Lottery: Luckypic')
.setColor('Green')
.addFields(
{ name: '**You got**', value: `${randomAmt}:wl:`, inline: false },
)
.setTimestamp();

const dmChannel = await user.createDM();
// Check if the bot has permission to send messages
if (user.permissionsIn(dmChannel).has("SEND_MESSAGES")) {
dmChannel.send({ embeds: [userEmbed] });
} else {
return false;
}
} catch (error) {
console.error(`Failed to send DM to user ${userIds}:`, error);
}
}
8 replies
DIAdiscord.js - Imagine an app
Created by igzh on 5/21/2024 in #djs-questions
unknown interactions
i keep gettings this error when i use /itemsdat command
3 replies
DIAdiscord.js - Imagine an app
Created by igzh on 5/21/2024 in #djs-questions
duplicated commands
i did try to fix it but still it here is the code
12 replies
DIAdiscord.js - Imagine an app
Created by igzh on 5/1/2024 in #djs-questions
Buttons error
i want to do 3 buttons width and 8 length in total 24 buttons but its not working it keep giving me this error components[BASE_TYPE_MAX_LENGTH]: Must be 5 or fewer in length. at handleErrors (C:\Users\abod2\OneDrive\Desktop\2024-02-12\2024-02-12\Gamble\botas\node_modules@discordjs\rest\dist\index.js:640:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SequentialHandler.runRequest (C:\Users\abod2\OneDrive\Desktop\2024-02-12\2024-02-12\Gamble\botas\node_modules@discordjs\rest\dist\index.js:1021:23)
at async SequentialHandler.queueRequest (C:\Users\abod2\OneDrive\Desktop\2024-02-12\2024-02-12\Gamble\botas\node_modules@discordjs\rest\dist\index.js:862:14)
at async REST.request (C:\Users\abod2\OneDrive\Desktop\2024-02-12\2024-02-12\Gamble\botas\node_modules@discordjs\rest\dist\index.js:1387:22) at async InteractionWebhook.send (C:\Users\abod2\OneDrive\Desktop\2024-02-12\2024-02-12\Gamble\botas\node_modules\discord.js\src\structures\Webhook.js:222:15)
at async Object.execute (C:\Users\abod2\OneDrive\Desktop\2024-02-12\2024-02-12\Gamble\botas\src\commands\currency\misc\towers.js:83:28) { requestBody: { files: [], json: { content: undefined, tts: false, nonce: undefined, embeds: [Array], components: [Array], username: undefined, avatar_url: undefined, allowed_mentions: undefined, flags: undefined, message_reference: undefined, attachments: undefined, sticker_ids: undefined, thread_name: undefined } }, rawError: { message: 'Invalid Form Body', code: 50035, errors: { components: [Object] } }, code: 50035, status: 400, method: 'POST', url: '' }
10 replies
DIAdiscord.js - Imagine an app
Created by igzh on 4/30/2024 in #djs-questions
Minesweeper code error
No description
16 replies
VVALORANT
Created by igzh on 3/26/2024 in #community-help
Error code val 4
No description
21 replies
DIAdiscord.js - Imagine an app
Created by igzh on 2/23/2024 in #djs-questions
settings command
No description
4 replies
DIAdiscord.js - Imagine an app
Created by igzh on 2/23/2024 in #djs-questions
Saving
No description
4 replies