Remove the implication that a Message object's ID is unique only to the channel it was sent on
Message ID's are snowflakes, and as stated in Discord's API documentation, globally unique throughout Discord
* using correct properties to apply permissionOverwrites
and fixed `GuildChannel#clone`
* also arrays should be mapped and correct properties taking priority
* changed .deny and .allow to .denied and .allowed respectively
* whoops
* Add `count` optional argument to Collection methods
[NON-BREAKING CHANGE]
An optional `count` argument is added to the following methods:
- random() and randomKey()
- first() and firstKey()
- last() and lastKey()
If `count` is used, the method returns an array instead of only the value. Performance impact non-existent for existing code. Performance for returning an array has been measured and this is the fastest I could find (array[i] = value is faster than array.push()).
* Update Collection.js
Fixed spacing/line length errors according to suggestions by codacy/pr
* Fixed docs
Added proper `@returns {*|Array}` as the methods might return either. Also added params where missing (whoops)
* Further doc fixes
Per Crawl's comments, fixed (i + 1) spacing as well as fixed {Integer} to {number}
* random() and randomKey() fix
Per Hydra's comment, random() and randomKey() now ensures unique values.
I've also resolved potential issues with requesting a count higher than the collection size. A collection with 10 items will only ever return at most 10 items using the `count` property.
* Can I facepalm harder
Had wrong header comments ^_^
* Fixed for "values/value" and Omited
Also, added "Positive" integer check.
* looks like I "omitted" a change, there.
* Update Collection.js
* Update Collection.js
* Update Collection.js
* Add denied/allowed permissions to PermissionOverwrites
* Remove one accidental trailing space.
* Change to _denied/_allowed & denied/allowed
This could possible break if people use deny/allow, I assume, but that's okay.
* Update PermissionOverwrites.js
* Update PermissionOverwrites.js