M
M
Mops1072021-12-21 17:31:18
Node.js
Mops107, 2021-12-21 17:31:18

How to make a message send depending on a chat in discord.js?

You need to make a code according to the principle

If the message is from chat 1
Send to chat 2

If the message is from chat 2
Send to chat 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-12-24
@Mops107

if (message.author.bot) return;

let id1 = "ID_первого_канала", id2 = "ID_второго_канала";

if (message.channel.id === id1) {
    return message.guild.channels.cache.get(id2).send(message.content)
} else if (message.channel.id === id2) {
    return message.guild.channels.cache.get(id1).send(message.content)
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question