Nelvazz
Nelvazz
DIAdiscord.js - Imagine an app
Created by Nelvazz on 11/24/2023 in #djs-questions
Images in slash commands
I was wondering if this was possible and it is
20 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 11/24/2023 in #djs-questions
Images in slash commands
No description
20 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 11/24/2023 in #djs-questions
Images in slash commands
Are you available in vocal ? I don't understand how to explain you this by text certainly some demonstrations will be enough 😅
20 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 11/24/2023 in #djs-questions
Images in slash commands
So i'm forced to put an url and not a image attachment if i want my slash command to pick up a image sent with the slash command ?
20 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 11/24/2023 in #djs-questions
Images in slash commands
When you are sending a slash commande (for example /profile images:image_attachment) it takes in account the images set as an attachments without it being a link but a real attachment
20 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 11/24/2023 in #djs-questions
Images in slash commands
Oh i don't mean like that 😅
20 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 1/13/2023 in #djs-questions
Filter for Message Collector is not working
Oh okay that's logic now (i didn't knew about this thx)
7 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 1/13/2023 in #djs-questions
Filter for Message Collector is not working
So i need to do { filter: filterMessage } ?
7 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 1/13/2023 in #djs-questions
Filter for Message Collector is not working
Every filter needs to be called filter ? 🤔
7 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 1/7/2023 in #djs-questions
Set image to spoiler in embeds
I think it's for text only too :/ if you put .setSpoiler(true) in an embed builder it returns .setSpoiler is not a function
10 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 1/7/2023 in #djs-questions
Set image to spoiler in embeds
It did not work 😕
10 replies
DIAdiscord.js - Imagine an app
Created by Nelvazz on 10/16/2022 in #djs-questions
Shards Interaction
I've done something like this:
const Embed = new MessageEmbed()
.setDescription('testing shards broadcastEval')

const Buttons = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('buttonid')
.setEmoji('❗')
.setStyle('SECONDARY'),
)

const msg = await bot.shard.broadcastEval(async (c, embed, buttons) => {
const channel = await c.channels.cache.get('id');
if (channel) {
let m = await channel.send({ embeds: [embed.embed[0]], components: embed.buttons })
const collector = m.createMessageComponentCollector({ time: 30000 })

collector.on('collect', async(i) => {
console.log('user interacted')
})
}
}, { context: { embed: [Embed], buttons: [Buttons] } })
const Embed = new MessageEmbed()
.setDescription('testing shards broadcastEval')

const Buttons = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('buttonid')
.setEmoji('❗')
.setStyle('SECONDARY'),
)

const msg = await bot.shard.broadcastEval(async (c, embed, buttons) => {
const channel = await c.channels.cache.get('id');
if (channel) {
let m = await channel.send({ embeds: [embed.embed[0]], components: embed.buttons })
const collector = m.createMessageComponentCollector({ time: 30000 })

collector.on('collect', async(i) => {
console.log('user interacted')
})
}
}, { context: { embed: [Embed], buttons: [Buttons] } })
But now if i want to send an other embed from the interaction do i really need to define MessageEmbed again ?
const msg = await bot.shard.broadcastEval(async (c, embed, buttons) => {
const { MessageEmbed } = require('discord.js') // Do i really need to add this for every discord.js functionnality ?
const channel = await c.channels.cache.get('id');
if (channel) {
let m = await channel.send({ embeds: [embed.embed[0]], components: embed.buttons })
const collector = m.createMessageComponentCollector({ time: 30000 })

collector.on('collect', async(i) => {
switch(i.id) {
case 'buttonid':
const embed2 = new MessageEmbed()
.setDescription('another embed')
i.reply({ embeds: [embed2] })
break
}
})
}
}, { context: { embed: [Embed], buttons: [Buttons] } })
const msg = await bot.shard.broadcastEval(async (c, embed, buttons) => {
const { MessageEmbed } = require('discord.js') // Do i really need to add this for every discord.js functionnality ?
const channel = await c.channels.cache.get('id');
if (channel) {
let m = await channel.send({ embeds: [embed.embed[0]], components: embed.buttons })
const collector = m.createMessageComponentCollector({ time: 30000 })

collector.on('collect', async(i) => {
switch(i.id) {
case 'buttonid':
const embed2 = new MessageEmbed()
.setDescription('another embed')
i.reply({ embeds: [embed2] })
break
}
})
}
}, { context: { embed: [Embed], buttons: [Buttons] } })
4 replies