Kilian
Kilian
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Azure on 10/28/2022 in #djs-questions
Interaction already submitted
Why do you want to execute the interaction on the builder? Do the execute on your client.on(interactionCreate). I would recommend this for you. The work with interaction.commandName
8 replies
DIAdiscord.js - Imagine an app
Created by billytheape on 10/27/2022 in #djs-questions
Show modal and remove previous ephemeral
You can’t delete ephemeral messages. I would recommend the method of interaction.editReply.
5 replies
DIAdiscord.js - Imagine an app
Created by Kilian on 10/4/2022 in #djs-questions
use mysql values for export const
I guess I've to work with promise aswell right?
71 replies
DIAdiscord.js - Imagine an app
Created by Kilian on 10/4/2022 in #djs-questions
use mysql values for export const
Code:
if (message.content.includes("kilian")) {
dbaccess.query(`SELECT * FROM embeds WHERE name = 'test_embed'`, (error, success) => {
if (error) {
console.log(error);
}

let testembed_color = success[0].color
let testembed_title = success[0].title
let testembed_description = success[0].description

const test_embed = new EmbedBuilder()
.setColor(testembed_color)
.setTitle(testembed_title)
.setDescription(testembed_description);

message.reply({embeds: [test_embed]})

});

}
if (message.content.includes("kilian")) {
dbaccess.query(`SELECT * FROM embeds WHERE name = 'test_embed'`, (error, success) => {
if (error) {
console.log(error);
}

let testembed_color = success[0].color
let testembed_title = success[0].title
let testembed_description = success[0].description

const test_embed = new EmbedBuilder()
.setColor(testembed_color)
.setTitle(testembed_title)
.setDescription(testembed_description);

message.reply({embeds: [test_embed]})

});

}
71 replies
DIAdiscord.js - Imagine an app
Created by Kilian on 10/4/2022 in #djs-questions
use mysql values for export const
Okay, my plan did change. I do not need to export anymore because, what if I need any interactionvalue like ${interaction.id}. So I moved query into the messageCreate.js. It works fine now. But maybe you can tell me how I get like the message.author.id into my query?
71 replies
DIAdiscord.js - Imagine an app
Created by Kilian on 10/4/2022 in #djs-questions
use mysql values for export const
oh I though it could be an string, my bad
71 replies
DIAdiscord.js - Imagine an app
Created by Kilian on 10/4/2022 in #djs-questions
use mysql values for export const
Didn't you say that I should use async/await ?
71 replies
DIAdiscord.js - Imagine an app
Created by Kilian on 10/4/2022 in #djs-questions
use mysql values for export const
I did it wrong?
71 replies