mr.energetico
mr.energetico
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
let embed = new EmbedBuilder()
.setTitle(`PROFILO DI ${target.username.toUpperCase()}`)
//.setDescription(` \u1CBC\u1CBC \u1CBC\u1CBC**\`NOME :\`** ${target.username} **\`ID 71:\`** ${target.id} \n **\`BADGE :\`** ${data1.badgeSlot} ⠀⠀⠀⠀⠀⠀⠀**\`PREMIUM :\`** ${data.premium} \n **\`LEVEL :\`** ${data.level} ( ${data.xp} XP ) ⠀⠀⠀⠀⠀⠀⠀ **\`RANK :\`** ${currentRank} `)
.addFields(
{ name: `**\`NOME :\`** ${target.username}`, value: `**\`NOME :\`** ${target.username}`, inline:true },
)
.addFields(
{ name: `**\`NOME :\`** ${target.username}`, value: `**\`NOME :\`** ${target.username}`, inline:true },
)
.addFields(
{ name: ` `, value: ` `, inline:true },
)

.addFields(
{ name: `**\`NOME :\`** ${target.username}`, value: `**\`NOME :\`** ${target.username}`, inline:true },
)
.setColor(color.fun)

interaction.reply({ embeds : [embed]})
let embed = new EmbedBuilder()
.setTitle(`PROFILO DI ${target.username.toUpperCase()}`)
//.setDescription(` \u1CBC\u1CBC \u1CBC\u1CBC**\`NOME :\`** ${target.username} **\`ID 71:\`** ${target.id} \n **\`BADGE :\`** ${data1.badgeSlot} ⠀⠀⠀⠀⠀⠀⠀**\`PREMIUM :\`** ${data.premium} \n **\`LEVEL :\`** ${data.level} ( ${data.xp} XP ) ⠀⠀⠀⠀⠀⠀⠀ **\`RANK :\`** ${currentRank} `)
.addFields(
{ name: `**\`NOME :\`** ${target.username}`, value: `**\`NOME :\`** ${target.username}`, inline:true },
)
.addFields(
{ name: `**\`NOME :\`** ${target.username}`, value: `**\`NOME :\`** ${target.username}`, inline:true },
)
.addFields(
{ name: ` `, value: ` `, inline:true },
)

.addFields(
{ name: `**\`NOME :\`** ${target.username}`, value: `**\`NOME :\`** ${target.username}`, inline:true },
)
.setColor(color.fun)

interaction.reply({ embeds : [embed]})
`
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
@Qjuh @rmHawk765 Thank you very much for your help, for anyone who needs it, here's how I solved it
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
But how do you put the space, if I put more than one, only one counts
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
here it is
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
No description
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
the screenshot
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/29/2024 in #djs-questions
Horizontal fields
oh sorry
12 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 5/3/2024 in #djs-questions
How to change a variable that is in an array that is in an array in database in discord.js v14 ...
sorry, i found out thats the wrong channel for that type of question
3 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/13/2024 in #djs-questions
I need to get a message id
@Syjalo thank you
4 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
so I should make another file named deploy.js and put the global commands code there?
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
@endergamermc
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
it says rest is not defined, what library should i use to define it?
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
now i have this error
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
C:\Users\MATTEO\Desktop\PizzaBot\index.js:20 rest.put( ^ ReferenceError: rest is not defined at Object.<anonymous> (C:\Users\MATTEO\Desktop\PizzaBot\index.js:20:9) at Module._compile (node:internal/modules/cjs/loader:1126:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
ok
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
and this is the error
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
this is my index.js
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
global.Discord = require("discord.js")
const fs = require('node:fs');
const path = require('node:path');
const key = require("./JSON/bot/key.json")
global.client = new Discord.Client({
intents: 32767,
partials: ["CHANNEL", "MESSAGE", "REACTION"]

})
client.commands = new Discord.Collection()


const commandsFolder = fs.readdirSync("./commands");
for (const folder of commandsFolder) {
const commandsFiles = fs.readdirSync(`./commands/${folder}`).filter(file => file.endsWith(".js"));
for (const file of commandsFiles) {
const command = require(`./commands/${folder}/${file}`);
client.commands.set(command.name, command);

await rest.put(
Routes.applicationCommands(key.clientId),
{ body: command },
);
}
}



const eventsFolder = fs.readdirSync("./events")
for (const folder of eventsFolder) {
const eventsFiles = fs.readdirSync(`./events/${folder}`).filter(file => file.endsWith(".js"));
for (const file of eventsFiles) {
const event = require(`./events/${folder}/${file}`);
client.on(event.name, (...args) => event.execute(...args))
}
}

client.on("interactionCreate", interaction => {
if (!interaction.isCommand()) return

const command = client.commands.get(interaction.commandName)
if (!command) return

command.execute(interaction, client)
})


client.login(key.token)
global.Discord = require("discord.js")
const fs = require('node:fs');
const path = require('node:path');
const key = require("./JSON/bot/key.json")
global.client = new Discord.Client({
intents: 32767,
partials: ["CHANNEL", "MESSAGE", "REACTION"]

})
client.commands = new Discord.Collection()


const commandsFolder = fs.readdirSync("./commands");
for (const folder of commandsFolder) {
const commandsFiles = fs.readdirSync(`./commands/${folder}`).filter(file => file.endsWith(".js"));
for (const file of commandsFiles) {
const command = require(`./commands/${folder}/${file}`);
client.commands.set(command.name, command);

await rest.put(
Routes.applicationCommands(key.clientId),
{ body: command },
);
}
}



const eventsFolder = fs.readdirSync("./events")
for (const folder of eventsFolder) {
const eventsFiles = fs.readdirSync(`./events/${folder}`).filter(file => file.endsWith(".js"));
for (const file of eventsFiles) {
const event = require(`./events/${folder}/${file}`);
client.on(event.name, (...args) => event.execute(...args))
}
}

client.on("interactionCreate", interaction => {
if (!interaction.isCommand()) return

const command = client.commands.get(interaction.commandName)
if (!command) return

command.execute(interaction, client)
})


client.login(key.token)
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
C:\Users\MATTEO\Desktop\PizzaBot\index.js:20 await rest.put( ^^^^^ SyntaxError: await is only valid in async functions and the top level bodies of modules at Object.compileFunction (node:vm:360:18) at wrapSafe (node:internal/modules/cjs/loader:1055:15) at Module._compile (node:internal/modules/cjs/loader:1090:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47
34 replies
DIAdiscord.js - Imagine an app
Created by mr.energetico on 4/7/2023 in #djs-questions
Deploy Commands
Excuse my ignorance but I'm new and know almost nothing
34 replies