discord js channel connect

Solutions on MaxInterview for discord js channel connect by the best coders in the world

showing results for - "discord js channel connect"
Kinsley
18 Feb 2016
1client.on('message', message => {
2    if (message.author.bot) return;
3    if (message.channel.id === '2ND CHANNEL ID'){
4        const Messager = message.author.username;
5        const GlobalMessage = message.content;
6        const GlobalSender = client.channels.cache.find(channel => channel.id === '1ST CHANNEL ID')
7        const EmoGlobalChatEmbed = new Discord.MessageEmbed()
8            .setColor('#b700ff')
9            .setTitle("Message From : " + Messager)
10            .addField(" \u200B ", GlobalMessage)
11            .setFooter('Best, Emo', 'https://i.ibb.co/qjgWyQP/emo.png');
12            message.channel.send("Message Executed")
13        message.channel.send(EmoGlobalChatEmbed);
14        GlobalSender.send("**New Message : **")
15        GlobalSender.send(EmoGlobalChatEmbed)
16        message.delete()
17    } else if (message.channel.id === '1ST CHANNEL ID') {
18        const Messager = message.author.username;
19        const GlobalMessage = message.content;
20        const GlobalSender = client.channels.cache.find(channel => channel.id === '2ND CHANNEL ID')
21        const EmoGlobalChatEmbed = new Discord.MessageEmbed()
22            .setColor('#b700ff')
23            .setTitle("Message From : " + Messager)
24            .addField(" \u200B ", GlobalMessage)
25            .setFooter('Best, Emo', 'https://i.ibb.co/qjgWyQP/emo.png');
26        message.channel.send("Message Executed")
27        message.channel.send(EmoGlobalChatEmbed);
28        GlobalSender.send("**New Message : **")
29        GlobalSender.send(EmoGlobalChatEmbed)
30        message.delete()
31    }
32})