mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
feat: external collection package (#2934)
* Use external collection package * Complete typings * Document properly base collection class * Add clone since sort is now in-place * Update for latest changes to package * Fix whitespace * Update docs link * Oops * Update Collection.js * Update index.d.ts
This commit is contained in:
@@ -432,7 +432,7 @@ class Util {
|
||||
* @returns {Collection}
|
||||
*/
|
||||
static discordSort(collection) {
|
||||
return collection.sort((a, b) =>
|
||||
return collection.sorted((a, b) =>
|
||||
a.rawPosition - b.rawPosition ||
|
||||
parseInt(b.id.slice(0, -10)) - parseInt(a.id.slice(0, -10)) ||
|
||||
parseInt(b.id.slice(10)) - parseInt(a.id.slice(10))
|
||||
|
||||
Reference in New Issue
Block a user