inkihh
inkihh
DIAdiscord.js - Imagine a boo! 👻
Created by inkihh on 4/26/2024 in #djs-questions
Message listener only on certain channels?
Hey there! So I have this:
module.exports = {
name: Events.MessageCreate,
async execute(message)
{
message.fetch()
.then(console.log)
.catch(console.error);
}
};
module.exports = {
name: Events.MessageCreate,
async execute(message)
{
message.fetch()
.then(console.log)
.catch(console.error);
}
};
This apparently listens to every channel the bot has access to. Can I restrict it to just one channel or some channels? I can probably check the channel id within the body of execute(message) but I wonder if there's a method that only listens to certain channels in the first place.
15 replies