#Bot does not react to message
1 messages ยท Page 1 of 1 (latest)
yes ?
@dire steeple Do you have the proper intents?
yup
What are you trying to do?
i want the bot to react to the messages in that channel
reacting to every message as a test thing, I think\
Ohhh
You are retrieving a channel and then considering it a message
my intents and partials
intents: ["GUILDS", "GUILD_MESSAGE_REACTIONS", "GUILD_MEMBERS", "GUILD_MESSAGES"],
partials: ["REACTION", "MESSAGE"]```
Wdym?
All messages?
yes
Then you need to fetch it
And react forEach, but Ig it will be API spam
um
So it isn't good idea
Favn what are you saying lmao, they just can listen to Client:messageCreate
i wanted it like that
I can't understand
Oh
Ig I understood
Iyou trying to do that bot will react for the message sent from user?
yup
Then why do you getting channel?
You can just check if msg.channel.id matches that id, and if it does, react to it, else return
how should i tell u umm
You have message, just do message.react() if message.channel.id is that you need
Can you show that code, please
How did you do it before?
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:");
});
})
<Message>.react is not valid, you need a reaction manager.
How you waz doing
No no, the one you were using before this
From when?
const client = require("../index");
client.on("messageCreate", async (message) => {
if(message.channel.id ==='943579372206583940') {
message.react('๐')
message.react('๐')
}
})
but this is not correct
and ik
that
Documentation suggestion for @steady hearth:
<:_:874569335308431382> Message#react()
Adds a reaction to the message.
Are you sure event is firing?
Log something
ok
Before if statement
Why would we have such a method outside of its manager xD
Ease of use, I assume
Lol
Anytime dude
Dont sweat it