fix(snowflake): snowflakes length (#9144)

* fix(snowflake): fix snowflakes length

* fix(snowflake): fix length
This commit is contained in:
DraftMan
2023-03-12 21:07:51 +01:00
committed by GitHub
parent 4458a13925
commit 955e8fe312
2 changed files with 4 additions and 4 deletions

View File

@@ -148,7 +148,7 @@ class ThreadManager extends CachedManager {
let id;
const query = makeURLSearchParams({ limit });
if (typeof before !== 'undefined') {
if (before instanceof ThreadChannel || /^\d{16,19}$/.test(String(before))) {
if (before instanceof ThreadChannel || /^\d{17,19}$/.test(String(before))) {
id = this.resolveId(before);
timestamp = this.resolve(before)?.archivedAt?.toISOString();
const toUse = type === 'private' && !fetchAll ? id : timestamp;