JoohnWiick
JoohnWiick
DIAdiscord.js - Imagine an app
Created by JoohnWiick on 9/2/2023 in #djs-questions
How do I provide a variable for my interactionCreate event in another file?
archive "getdata.js"
async run({client, interaction, options}){
const filtered = choicesUsers.filter(({name}) => name.toLowerCase() === interaction.options.getString('identificator').toLowerCase())
let embed = new Discord.EmbedBuilder()
.setDescription(`ID: ${filtered[0].id} \n Usuário: ${filtered[0].name} \n Email: ${filtered[0].email} \n createdAt: ${filtered[0].createdAt} \n Discord | ID: ${filtered[0].discord ? filtered[0].discord.id : "Não Vinculado"} | username: ${filtered[0].discord ? filtered[0].discord.username : "Não vinculado"}`)
.setColor('Blurple')
async run({client, interaction, options}){
const filtered = choicesUsers.filter(({name}) => name.toLowerCase() === interaction.options.getString('identificator').toLowerCase())
let embed = new Discord.EmbedBuilder()
.setDescription(`ID: ${filtered[0].id} \n Usuário: ${filtered[0].name} \n Email: ${filtered[0].email} \n createdAt: ${filtered[0].createdAt} \n Discord | ID: ${filtered[0].discord ? filtered[0].discord.id : "Não Vinculado"} | username: ${filtered[0].discord ? filtered[0].discord.username : "Não vinculado"}`)
.setColor('Blurple')
I need to pass the 'filtered' variable to the file below to use it in the event archive "getDataInteraction.js"
const Discord = require("discord.js");
const { Events } = Discord;

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if (interaction.customId === 'account-licenses') {
console.log('license for: ??')
//interaction.edit()
}
},
};
const Discord = require("discord.js");
const { Events } = Discord;

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if (interaction.customId === 'account-licenses') {
console.log('license for: ??')
//interaction.edit()
}
},
};
4 replies
DIAdiscord.js - Imagine an app
Created by JoohnWiick on 8/27/2023 in #djs-questions
Is it possible in these forms instead of a text field, to put a checkbox?
4 replies
DIAdiscord.js - Imagine an app
Created by JoohnWiick on 8/27/2023 in #djs-questions
How create Forms
4 replies