From 5ce2dc1bb4ee93f7e5121f684f957eb99ead22b8 Mon Sep 17 00:00:00 2001 From: Kareem Olim Date: Sat, 19 Nov 2022 15:54:48 +0200 Subject: feat(plugin): Read all notifications button (#217) Co-authored-by: Ven --- src/utils/constants.ts | 4 ++++ src/utils/discord.ts | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 307de87..7f44ee0 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -136,5 +136,9 @@ export const Devs = Object.freeze({ KraXen72: { name: "KraXen72", id: 379304073515499530n + }, + kemo: { + name: "kemo", + id: 299693897859465228n } }); diff --git a/src/utils/discord.ts b/src/utils/discord.ts index 75fb079..7fc5064 100644 --- a/src/utils/discord.ts +++ b/src/utils/discord.ts @@ -18,7 +18,7 @@ import { Guild } from "discord-types/general"; -import { ChannelStore, GuildStore,SelectedChannelStore } from "../webpack/common"; +import { ChannelStore, GuildStore, PrivateChannelsStore, SelectedChannelStore } from "../webpack/common"; export function getCurrentChannel() { return ChannelStore.getChannel(SelectedChannelStore.getChannelId()); @@ -27,3 +27,7 @@ export function getCurrentChannel() { export function getCurrentGuild(): Guild | undefined { return GuildStore.getGuild(getCurrentChannel()?.guild_id); } + +export function openPrivateChannel(userId: string) { + PrivateChannelsStore.openPrivateChannel(userId); +} -- cgit