Toasty
Toasty
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Duplicating Embeds
const id = new EmbedBuilder()
.setTitle('User Identification')
.addFields(
{ name: 'Buyer', value: '`None`' },
{ name: 'Seller', value: '`None`' },
);
const roles = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('buyer')
.setLabel('I am buyer')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('seller')
.setLabel('I am seller')
.setStyle(ButtonStyle.Secondary)
)
channel.send({ embeds: [id], components: [roles]})
const collector = channel.createMessageComponentCollector({
componentType: ComponentType.Button,

});
collector.on('collect', (interaction) => {
var buy = '`None`'
var sell = '`None`'
if (interaction.customId === 'buyer') {
buy = interaction.member
const id = new EmbedBuilder()
.setTitle('User Identification')
.addFields(
{ name: 'Buyer', value: `${buy}` },
{ name: 'Seller', value: `${sell}` },
);

interaction2.editReply({embeds: [id]})
const id = new EmbedBuilder()
.setTitle('User Identification')
.addFields(
{ name: 'Buyer', value: '`None`' },
{ name: 'Seller', value: '`None`' },
);
const roles = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('buyer')
.setLabel('I am buyer')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('seller')
.setLabel('I am seller')
.setStyle(ButtonStyle.Secondary)
)
channel.send({ embeds: [id], components: [roles]})
const collector = channel.createMessageComponentCollector({
componentType: ComponentType.Button,

});
collector.on('collect', (interaction) => {
var buy = '`None`'
var sell = '`None`'
if (interaction.customId === 'buyer') {
buy = interaction.member
const id = new EmbedBuilder()
.setTitle('User Identification')
.addFields(
{ name: 'Buyer', value: `${buy}` },
{ name: 'Seller', value: `${sell}` },
);

interaction2.editReply({embeds: [id]})
6 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Duplicating Embeds
6 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Duplicating Embeds
The buttons still control the top ones tho
6 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Duplicating Embeds
6 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
How do I make a role system
7 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
How do I make a role system
7 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
How do I make a role system
Like this
7 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
How do I make a role system
No Error just trying to figure out how to do this
7 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
How do I make a role system
7 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
It was just all the way up I figured it out
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
command.execute(interaction)
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
cause of this line
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
Now I get this error TypeError: Cannot read properties of undefined (reading 'execute') at Client.<anonymous> (C:\Users\yeeca\Desktop\DMM Auto\index.js:32:17) at Client.emit (node:events:513:28) at InteractionCreateAction.handle (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12) at module.exports [as INTERACTION_CREATE] (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\websocket\WebSocketManager.js:354:31) at WebSocketManager.<anonymous> (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\websocket\WebSocketManager.js:238:12) at WebSocketManager.emit (C:\Users\yeeca\Desktop\DMM Auto\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.<anonymous> (C:\Users\yeeca\Desktop\DMM Auto\node_modules@discordjs\ws\dist\index.js:1103:51) at WebSocketShard.emit (C:\Users\yeeca\Desktop\DMM Auto\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.onMessage (C:\Users\yeeca\Desktop\DMM Auto\node_modules@discordjs\ws\dist\index.js:938:14)
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
Oh
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
Whenever the select menu is ran
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
Just wont print
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
No Error
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/18/2023 in #djs-questions
Detecting user select menus
client.on(Events.InteractionCreate, interaction => { if(!interaction.isChatInputCommand()) return; if(interaction.isUserSelectMenu()) { console.log('Hey') } console.log(client.commands) let command = client.commands.get(interaction.commandName); try { if(interaction.replied) return; command.execute(interaction) } catch (error){ console.error(error); } });
15 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/17/2023 in #djs-questions
Send welcome message in random channel when bot is invited!
Where???
24 replies
DIAdiscord.js - Imagine an app
Created by Toasty on 7/17/2023 in #djs-questions
Send welcome message in random channel when bot is invited!
ReferenceError: ChannelType is not defined
24 replies