diff options
author | V <vendicated@riseup.net> | 2023-04-15 04:42:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 04:42:18 +0200 |
commit | 88ad4f1b0597a06695aae4166fb8ac1024f31c4c (patch) | |
tree | 7b77998146f62bc87e70b59d3a8a4309b12d1f7d /src/utils | |
parent | f75f88786118640dd72b40adf587a725493aa8a0 (diff) | |
download | Vencord-88ad4f1b0597a06695aae4166fb8ac1024f31c4c.tar.gz Vencord-88ad4f1b0597a06695aae4166fb8ac1024f31c4c.tar.bz2 Vencord-88ad4f1b0597a06695aae4166fb8ac1024f31c4c.zip |
SendTimestamps (#891)
Co-authored-by: Tyler Flowers <contact@ggtylerr.dev>
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; +} |