aboutsummaryrefslogtreecommitdiff
path: root/src/utils/discord.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/discord.ts')
-rw-r--r--src/utils/discord.ts6
1 files changed, 5 insertions, 1 deletions
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);
+}