mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
More documentation and updated some PM Channel code
The PM Channel will now also trunc messages and cap the array size
This commit is contained in:
@@ -13,6 +13,11 @@ class PMChannel {
|
||||
}
|
||||
|
||||
getMessage(key, value){
|
||||
|
||||
if(this.messages.length > 1000){
|
||||
this.messages.splice(0,1);
|
||||
}
|
||||
|
||||
for(var message of this.messages){
|
||||
if(message[key] === value){
|
||||
return message;
|
||||
|
||||
Reference in New Issue
Block a user