From ea642d9e901d42f0f5f73ba1f9cfeb3d1e595332 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 19 Mar 2023 05:44:11 -0300 Subject: [PATCH] Fix #598 (#612) --- src/plugins/fakeNitro.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index e9b19ca1..580d69e7 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -20,6 +20,7 @@ import { addPreEditListener, addPreSendListener, removePreEditListener, removePr import { migratePluginSettings, Settings } from "@api/settings"; import { Devs } from "@utils/constants"; import { ApngDisposeOp, getGifEncoder, importApngJs } from "@utils/dependencies"; +import { getCurrentGuild } from "@utils/discord"; import definePlugin, { OptionType } from "@utils/types"; import { findByCodeLazy, findByPropsLazy } from "@webpack"; import { ChannelStore, PermissionStore, UserStore } from "@webpack/common"; @@ -184,7 +185,7 @@ export default definePlugin({ }, get guildId() { - return window.location.href.split("channels/")[1].split("/")[0]; + return getCurrentGuild()?.id; }, get canUseEmotes() {