diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/constants.ts | 4 | ||||
-rw-r--r-- | src/utils/discord.ts | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 6a939c9..e2105ae 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -258,6 +258,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "pylix", id: 492949202121261067n }, + Tyler: { + name: "\\\\GGTyler\\\\", + id: 143117463788191746n + }, RyanCaoDev: { name: "RyanCaoDev", id: 952235800110694471n, diff --git a/src/utils/discord.ts b/src/utils/discord.ts index f1a1f8a..ec732b4 100644 --- a/src/utils/discord.ts +++ b/src/utils/discord.ts @@ -16,9 +16,12 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import { findLazy } from "@webpack"; import { ChannelStore, GuildStore, PrivateChannelsStore, SelectedChannelStore } from "@webpack/common"; import { Guild } from "discord-types/general"; +const PreloadedUserSettings = findLazy(m => m.ProtoClass?.typeName.endsWith("PreloadedUserSettings")); + export function getCurrentChannel() { return ChannelStore.getChannel(SelectedChannelStore.getChannelId()); } @@ -30,3 +33,12 @@ export function getCurrentGuild(): Guild | undefined { export function openPrivateChannel(userId: string) { PrivateChannelsStore.openPrivateChannel(userId); } + +export const enum Theme { + Dark = 1, + Light = 2 +} + +export function getTheme(): Theme { + return PreloadedUserSettings.getCurrentValue()?.appearance?.theme; +} |