From d5ee03f56a5a2016ec35be6d7598527f69195128 Mon Sep 17 00:00:00 2001 From: Nico Date: Mon, 8 Apr 2024 16:13:03 -0400 Subject: [PATCH 1/3] fix: status default --- packages/guilded.js/lib/structures/Client.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/guilded.js/lib/structures/Client.ts b/packages/guilded.js/lib/structures/Client.ts index 4507a18f..bc1951cb 100644 --- a/packages/guilded.js/lib/structures/Client.ts +++ b/packages/guilded.js/lib/structures/Client.ts @@ -238,8 +238,6 @@ export class Client extends (EventEmitter as unknown as new () => TypedEmitter TypedEmitter Date: Mon, 8 Apr 2024 16:13:35 -0400 Subject: [PATCH 2/3] Create fresh-apricots-train.md --- .changeset/fresh-apricots-train.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fresh-apricots-train.md diff --git a/.changeset/fresh-apricots-train.md b/.changeset/fresh-apricots-train.md new file mode 100644 index 00000000..9acb2889 --- /dev/null +++ b/.changeset/fresh-apricots-train.md @@ -0,0 +1,5 @@ +--- +"guilded.js": patch +--- + +fix: status default From f9e084e1c894160ffc59f3571982a42cffd22642 Mon Sep 17 00:00:00 2001 From: "Zaid Arshad (Nico)" Date: Mon, 8 Apr 2024 16:21:25 -0400 Subject: [PATCH 3/3] fix: types --- packages/guilded.js/lib/structures/Client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/guilded.js/lib/structures/Client.ts b/packages/guilded.js/lib/structures/Client.ts index bc1951cb..e59963a1 100644 --- a/packages/guilded.js/lib/structures/Client.ts +++ b/packages/guilded.js/lib/structures/Client.ts @@ -231,13 +231,15 @@ export class Client extends (EventEmitter as unknown as new () => TypedEmitter { - let resolvedDate: Date; + let resolvedDate: Date | undefined; if (options.expiresAt instanceof Date) { resolvedDate = options.expiresAt; } else if (typeof options.expiresAt === "string") { resolvedDate = new Date(options.expiresAt); } else if (typeof options.expiresAt === "number") { resolvedDate = new Date(Date.now() + options.expiresAt); + } else { + resolvedDate = options.expiresAt; } await this.rest.router.userStatus.userStatusCreate({