Answer the question
In order to leave comments, you need to log in
How to get the ID of a post for further use in discord.js?
Hello. I am new to discord.js bot writing.
Let's get down to business: I need to get the message ID using the bot and have it remember it.
Source:
client.on('message', message => {
if (message.content.toLowerCase()==config.prefix + "sms") {
{
message.reply(" скажи мне "привет")
}
const filter = m => (m.content.includes('привет') && m.author.id != client.user.id);
const channel = message.channel;
const collector = channel.createMessageCollector(filter, {max: 1, time: 10000 });
console.log("Сбор сообщений начат.");
collector.on('collect', m => console.log(`Collected ${m.content}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question