mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +00:00
Fix: discord sort method (#2355)
This commit is contained in:
parent
c25ea45866
commit
35babc706d
1 changed files with 2 additions and 2 deletions
|
|
@ -284,8 +284,8 @@ class Util {
|
||||||
static discordSort(collection) {
|
static discordSort(collection) {
|
||||||
return collection.sort((a, b) =>
|
return collection.sort((a, b) =>
|
||||||
a.rawPosition - b.rawPosition ||
|
a.rawPosition - b.rawPosition ||
|
||||||
parseInt(a.id.slice(0, -10)) - parseInt(b.id.slice(0, -10)) ||
|
parseInt(b.id.slice(0, -10)) - parseInt(a.id.slice(0, -10)) ||
|
||||||
parseInt(a.id.slice(10)) - parseInt(b.id.slice(10))
|
parseInt(b.id.slice(10)) - parseInt(a.id.slice(10))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue