Ashura
Ashura
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
im , i was just returning before defining the fields in the embed
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
No description
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
actually forget it , im rlly dumb
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
it kinda works now cause i get no error , whatever i get this interaction failed and it seems like it isnt executing anything , ill do some checkpoints to check it
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
ill try that and let you know , thx for now
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
this is where i save the actionrow in the db https://sourceb.in/0o51fnTYNE
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
ActionRowBuilder {
data: { type: 1 },
components: [
ButtonBuilder { data: [Object] },
ButtonBuilder { data: [Object] }
]
}
ActionRowBuilder {
data: { type: 1 },
components: [
ButtonBuilder { data: [Object] },
ButtonBuilder { data: [Object] }
]
}
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
any toughts?
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
same error
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
changed it but still doesnt work
27 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 10/8/2023 in #djs-questions
TypeError: component.toJSON is not a function
👍
27 replies
DIAdiscord.js - Imagine an app
Created by Jimmy_DB on 9/5/2023 in #djs-questions
connect two commands
good for starters
13 replies
DIAdiscord.js - Imagine an app
Created by Jimmy_DB on 9/5/2023 in #djs-questions
connect two commands
mongodb
13 replies
DIAdiscord.js - Imagine an app
Created by BOSSx on 9/6/2023 in #djs-questions
InteractionCreate.js / deploy-command.js
Yeah and also change path to your guild commands path
12 replies
DIAdiscord.js - Imagine an app
Created by Jimmy_DB on 9/5/2023 in #djs-questions
connect two commands
There’s a lot of ways to do that , like making a temp file , storing it in a db , etc
13 replies
DIAdiscord.js - Imagine an app
Created by Jimmy_DB on 9/5/2023 in #djs-questions
connect two commands
You should store the data from each use of the command and the use that data in the 3rd command
13 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 5/15/2023 in #djs-questions
Interaction has already been awknoledged
thank you
6 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 5/15/2023 in #djs-questions
Interaction has already been awknoledged
Code:
if(editmodal.components){
editmodal.setComponents()
}
const embedBreed = interaction.message.embeds[0]
const possibleStrings = ["Health", "Stamina", "Melee", "Food", "Oxygen"];
for (let i = 0; i < embedBreed.fields.length; i++) {
const field = embedBreed.fields[i];
const regex = /\*\*<:[^>]+>\s|\*\*/g;
const fieldName = field.name.replace(regex, "");
if (possibleStrings.includes(fieldName)) {
const row = new ActionRowBuilder()
const textinput = new TextInputBuilder()
.setLabel(fieldName)
.setPlaceholder(`Digite o novo ${fieldName} de seu dino.`)
.setRequired(true)
.setMaxLength(3)
.setCustomId(`${fieldName}modal`)
.setStyle(TextInputStyle.Short);
row.addComponents(textinput)
editmodal.addComponents(row)
}
}
interaction.showModal(editmodal)
}
if(editmodal.components){
editmodal.setComponents()
}
const embedBreed = interaction.message.embeds[0]
const possibleStrings = ["Health", "Stamina", "Melee", "Food", "Oxygen"];
for (let i = 0; i < embedBreed.fields.length; i++) {
const field = embedBreed.fields[i];
const regex = /\*\*<:[^>]+>\s|\*\*/g;
const fieldName = field.name.replace(regex, "");
if (possibleStrings.includes(fieldName)) {
const row = new ActionRowBuilder()
const textinput = new TextInputBuilder()
.setLabel(fieldName)
.setPlaceholder(`Digite o novo ${fieldName} de seu dino.`)
.setRequired(true)
.setMaxLength(3)
.setCustomId(`${fieldName}modal`)
.setStyle(TextInputStyle.Short);
row.addComponents(textinput)
editmodal.addComponents(row)
}
}
interaction.showModal(editmodal)
}
6 replies
DIAdiscord.js - Imagine an app
Created by Ashura on 2/18/2023 in #djs-questions
Interaction already awknoledged
kk , thank you
5 replies