Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js get the message before

message.channel.fetchMessages({limit: 2})
.then(messageMappings => {
let messages = Array.from(messageMappings.values());
let previousMessage = messages[1];
// do something with previous message
})
.catch(error => console.log(error))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #message
ADD COMMENT
Topic
Name
7+1 =