175
rated 0 times
[
182]
[
7]
/ answers: 1 / hits: 5387
/ 3 Years ago, fri, june 25, 2021, 12:00:00
I trying to make a code that fetch messages and filter them with content but it don’t work. I try this code:
client.on('message', message => {
if(message.content.startsWith('f-')){
var wf = message.content.substring(2);
message.channel.send(`message id: ${message.channel.messages.fetch().filter(mc => mc.startsWith(wf))}`);
}
});
But it gives that error: message.channel.messages.fetch(...).filter is not a function so i wanna ask is there a way to fetch messages by id
More From » discord