Tissemyren
Tissemyren
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 4/6/2024 in #djs-questions
Maybe this isn't discord.js but yesyes
Alright thanks
5 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 4/6/2024 in #djs-questions
Maybe this isn't discord.js but yesyes
There's no error
5 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/26/2024 in #djs-questions
I don't really understand the registering slash commands part of the guide
On the "Registering slash commands" page it does
11 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/26/2024 in #djs-questions
I don't really understand the registering slash commands part of the guide
No description
11 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/26/2024 in #djs-questions
I don't really understand the registering slash commands part of the guide
No description
11 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/26/2024 in #djs-questions
I don't really understand the registering slash commands part of the guide
and some of that code looks the same as the first script I sent
11 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/26/2024 in #djs-questions
I don't really understand the registering slash commands part of the guide
then on another page, it says to put this code in index.js
client.commands = new Collection();

const foldersPath = path.join(__dirname, 'commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
// Set a new item in the Collection with the key as the command name and the value as the exported module
if ('data' in command && 'execute' in command) {
client.commands.set(command.data.name, command);
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}
}
client.commands = new Collection();

const foldersPath = path.join(__dirname, 'commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
// Set a new item in the Collection with the key as the command name and the value as the exported module
if ('data' in command && 'execute' in command) {
client.commands.set(command.data.name, command);
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}
}
11 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/25/2024 in #djs-questions
Why does it just say "application didn't respond"?
oh, now it works, thanks :D
19 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/25/2024 in #djs-questions
Why does it just say "application didn't respond"?
I probably just misunderstood it
19 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/25/2024 in #djs-questions
Why does it just say "application didn't respond"?
No description
19 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/25/2024 in #djs-questions
Why does it just say "application didn't respond"?
but here it says to put it in deploy-commands.js
19 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/25/2024 in #djs-questions
Why does it just say "application didn't respond"?
Okay, but I don't really understand. Here it says to put the script in index.js
19 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/25/2024 in #djs-questions
Why does it just say "application didn't respond"?
In my index.js Just followed the documentation as well as I could
19 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'get')
Thanks, that worked!
6 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'get')
ReferenceError: Collection is not defined
6 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
Doesn't fetch the channel, why?
👍🏼
13 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
Doesn't fetch the channel, why?
const { EmbedBuilder, WebhookClient } = require("discord.js");

module.exports = async (client) => {
console.log("Loaded: Message Logger");

try {
const webhook = new WebhookClient({ id: '', token: '' });
const embed = new EmbedBuilder()
const channel = await client.channels.fetch("1198299044582281216", { force: true });
console.log(channel.name);

client.on("messageDelete", function(message) {
if (message.author.bot) return;


})

client.on("messageUpdate", function(oldMessage, message) {
if (message.author.bot) return;


})
} catch(error) {
console.error(error);
}
};
const { EmbedBuilder, WebhookClient } = require("discord.js");

module.exports = async (client) => {
console.log("Loaded: Message Logger");

try {
const webhook = new WebhookClient({ id: '', token: '' });
const embed = new EmbedBuilder()
const channel = await client.channels.fetch("1198299044582281216", { force: true });
console.log(channel.name);

client.on("messageDelete", function(message) {
if (message.author.bot) return;


})

client.on("messageUpdate", function(oldMessage, message) {
if (message.author.bot) return;


})
} catch(error) {
console.error(error);
}
};
13 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
Doesn't fetch the channel, why?
const channel = await client.channels.fetch("1198299044582281216", { force: true });
console.log(channel.name);
const channel = await client.channels.fetch("1198299044582281216", { force: true });
console.log(channel.name);
13 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
Doesn't fetch the channel, why?
then it just sets channel to null
13 replies
DIAdiscord.js - Imagine a bot
Created by Tissemyren on 2/24/2024 in #djs-questions
It doesn't fetch the channel
idk, but it's fixed anyway
4 replies