Auto react to messages

Hello everyone! I’m working on a discord bot I want the purpose of this bot to auto react to all the messages in a certain channel that I tell it to react for example
I have reaction channel if people type in it it will auto react with the emoji i have set in the coding It would be appreciated if anyone could help me and thanks

    client.on("message", message=>{
    if( === "NAME OF YOUR CHANNEL"){



Hey Jytesh your code makes sense and all but I put the code in and it doesn’t work i had ping pong on before I removed it and put it code I’m and doesn’t work and my bot is online and all too but it doesn’t work so here is my code

const express = require(“express”);
const fs = require(“fs”);
const discordBotkit = require(“botkit-discord”);
var Client = require(“uptime-robot”);

const app = express();

const discordBot = require("./bot");



const listener = app.listen(process.env.PORT, function() {
console.log("Your app is listening on port " + listener.address().port);

const Discord = require (‘discord.js’);
const bot = new Discord.Client();

bot.on(“message”, message=>{
if( === ‘621776248007557150’){



Are you encountering the error when you send a message to the channel?

You are trying to compare the name to the id, unless that is your channel name and not the ID (it looks like an ID)
You also have to use unicode emojis.
They cannot be :x:, they must be .
This is a great resource for finding unicode emojis.

1 Like

I don’t think so
In logs no errors last thing it says is logged in

And on discoes it doesn’t do anything when I send a message

Try doing this


Thank you, you were right it worked :heart:

It’s all good it worked WyattPlayz was right thank you all for helping :heart:

1 Like