How can I send a message to this channel?

Hey, how can I send a message to this channel?

const { Events, EmbedBuilder } = require("discord.js");
const { db } = require("../database.js");

module.exports = {
    name: Events.GuildCreate,
    once: false,
    async execute(guild) {
        const channelId = 1224860828784918528
        const guildOwner = await guild.fetchOwner()
        const dmEmbed = new EmbedBuilder()
            .setColor('Blurple')
            .setTitle('Getting Started')
            .setDescription(`Thank you for choosing Bridgify! Run the **/help** command to see my available commands!`)
            .setThumbnail(process.env.ICON_URL)
            .setTimestamp();

        await guildOwner.send({ embeds: [dmEmbed] }).catch(() => null);

        db.collection("guild-data").insertOne({guildId: guild.id})
        console.log(`[INFO]  >>>  I was just added to a new guild: ${guild.name} | ${guild.id} | Owner ID: ${guild.ownerId} | Size: ${guild.memberCount}`);

        const channel = guild.channels.cache.get(channelId)
        
        await channel.send("test worked")
    }
}



node:events:495
      throw er; // Unhandled 'error' event
      ^
TypeError: channel.send is not a function
    at Object.execute (/home/container/src/events/guildCreate.js:30:23)
    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)
Node.js v18.20.0
Was this page helpful?