Answers for "get channel from channel id discord.js"

5

Find channel discord js

// Insert the Channel ID in the brackets. TO find that, right click the
// channel and select "Copy ID". Discord Developer must be on.
let channel = message.guild.channels.cache.get(channelid)
Posted by: Guest on June-21-2020
2

how to get a channelid discord.js

message.guild.channels.cache.get(channelid);
Posted by: Guest on February-17-2021
1

discord js channel connect

client.on('message', message => {
    if (message.author.bot) return;
    if (message.channel.id === '2ND CHANNEL ID'){
        const Messager = message.author.username;
        const GlobalMessage = message.content;
        const GlobalSender = client.channels.cache.find(channel => channel.id === '1ST CHANNEL ID')
        const EmoGlobalChatEmbed = new Discord.MessageEmbed()
            .setColor('#b700ff')
            .setTitle("Message From : " + Messager)
            .addField(" \u200B ", GlobalMessage)
            .setFooter('Best, Emo', 'https://i.ibb.co/qjgWyQP/emo.png');
            message.channel.send("Message Executed")
        message.channel.send(EmoGlobalChatEmbed);
        GlobalSender.send("**New Message : **")
        GlobalSender.send(EmoGlobalChatEmbed)
        message.delete()
    } else if (message.channel.id === '1ST CHANNEL ID') {
        const Messager = message.author.username;
        const GlobalMessage = message.content;
        const GlobalSender = client.channels.cache.find(channel => channel.id === '2ND CHANNEL ID')
        const EmoGlobalChatEmbed = new Discord.MessageEmbed()
            .setColor('#b700ff')
            .setTitle("Message From : " + Messager)
            .addField(" \u200B ", GlobalMessage)
            .setFooter('Best, Emo', 'https://i.ibb.co/qjgWyQP/emo.png');
        message.channel.send("Message Executed")
        message.channel.send(EmoGlobalChatEmbed);
        GlobalSender.send("**New Message : **")
        GlobalSender.send(EmoGlobalChatEmbed)
        message.delete()
    }
})
Posted by: Guest on January-15-2021

Code answers related to "get channel from channel id discord.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language