Mandi
Mandi
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
Oh
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
client.channels.cache.get(logid).send({embeds: [embed]});
^
TypeError: Cannot read properties of undefined (reading 'send')
client.channels.cache.get(logid).send({embeds: [embed]});
^
TypeError: Cannot read properties of undefined (reading 'send')
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
Couldn't I just throw
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.MessageContent] });
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.MessageContent] });
Inside of the logging.js at the top?
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
im not informed on multi-file anything lol, for all my projects i end up working with 1 file for the most part
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
could log not just retrieve that from bot.js?
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
// utils/logging.js

export function log(message) {
console.log(`[${new Date().toLocaleString()}] ${message}`);

const embed = {
color: 0xCC5490,
description: `**${message}**`,
timestamp: new Date(),
footer: {
text: "REDACTED",
},
}
const logid = 'REDACTED';
client.channels.cache.get(logid).send({embeds: [embed]});
}
// utils/logging.js

export function log(message) {
console.log(`[${new Date().toLocaleString()}] ${message}`);

const embed = {
color: 0xCC5490,
description: `**${message}**`,
timestamp: new Date(),
footer: {
text: "REDACTED",
},
}
const logid = 'REDACTED';
client.channels.cache.get(logid).send({embeds: [embed]});
}
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
Please ping me if anyone knows
17 replies
DIAdiscord.js - Imagine an app
Created by Mandi on 8/29/2024 in #djs-questions
Attempting to remake my bot the "Correct" way
17 replies