#Bot does not react to message

1 messages ยท Page 1 of 1 (latest)

cosmic perch
dire steeple
#

yes ?

cosmic perch
#

@dire steeple Do you have the proper intents?

dire steeple
#

yup

unique smelt
#

What are you trying to do?

dire steeple
#

i want the bot to react to the messages in that channel

cosmic perch
steady hearth
#

You are retrieving a channel and then considering it a message

dire steeple
#

my intents and partials

intents: ["GUILDS", "GUILD_MESSAGE_REACTIONS", "GUILD_MEMBERS", "GUILD_MESSAGES"],
    partials: ["REACTION", "MESSAGE"]```
unique smelt
#

All messages?

dire steeple
unique smelt
#

Then you need to fetch it

dire steeple
#

then ?

unique smelt
#

And react forEach, but Ig it will be API spam

dire steeple
#

um

unique smelt
#

So it isn't good idea

dire steeple
#

its a suggestion system for my server

#

thats why

steady hearth
#

Favn what are you saying lmao, they just can listen to Client:messageCreate

dire steeple
#

i wanted it like that

unique smelt
#

I can't understand

#

Oh

#

Ig I understood

#

Iyou trying to do that bot will react for the message sent from user?

dire steeple
#

yup

unique smelt
#

Then why do you getting channel?

cosmic perch
dire steeple
unique smelt
dire steeple
#

i did that before

#

but didnt work

cosmic perch
#

Can you show that code, please

unique smelt
#

How did you do it before?

dire steeple
# cosmic perch Can you show that code, please
const client = require("../index");
client.on("messageCreate", async (message) => {

    client.channels.cache.get('943579372206583940').then(async msg => {
        await msg.react(":white_check_mark:");
        await msg.react(":x:");
        });

})
steady hearth
#

<Message>.react is not valid, you need a reaction manager.

unique smelt
#

How you waz doing

cosmic perch
#

No no, the one you were using before this

dire steeple
#

but this is not correct

#

and ik

#

that

languid sigilBOT
#

Documentation suggestion for @steady hearth:
<:_:874569335308431382> Message#react()
Adds a reaction to the message.

unique smelt
#

Log something

dire steeple
#

ok

unique smelt
#

Before if statement

steady hearth
unique smelt
#

๐Ÿคจ

#

Why not

cosmic perch
dire steeple
#

ok

#

u were correct

#

i just put the whole code in the main file

#

and it works now

cosmic perch
#

Lol

dire steeple
#

thank you guys

#

and sorry for my dumb mistake

cosmic perch
#

Anytime dude
Dont sweat it