noritem
noritem
DIAdiscord.js - Imagine an app
Created by noritem on 11/12/2023 in #djs-questions
channel is defnied but its says
const db = require('../../db/manager'); const { EmbedBuilder } = require('discord.js'); module.exports = async (client, member) => { const serverId = member.guild.id; const welcomeChannel = await db.getWelcomeChannel(serverId); const welcomeMessage = await db.getWelcomeMessage(serverId); const welcomeImage = await db.getWelcomeImage(serverId); console.log('Welcome Channel from DB:', welcomeChannel); const embedd = new EmbedBuilder() .setAuthor({ name: "Moxx", iconURL: welcomeImage }) .setTitle('Information') .setColor('#2F3136') .setTimestamp() .setDescription(welcomeMessage) .setFooter({ text: ${client.user.tag}, iconURL: welcomeImage }); if (!welcomeChannel) { return; } const channel = member.guild.channels.cache.get(welcomeChannel); if (!channel) { return; } channel.send({ embeds: [embedd] }); }; node:events:495 throw er; // Unhandled 'error' event ^ TypeError: channel.send is not a function at module.exports (C:\Users\mariu\Desktop\moxx handler\events\discord\guildMemberAdd.js:49:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:398:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
9 replies
DIAdiscord.js - Imagine an app
Created by noritem on 10/24/2023 in #djs-questions
Boost Logger
No description
16 replies