1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-11 02:16:23 +00:00
Vencord/src/utils/discord.ts

11 lines
366 B
TypeScript
Raw Normal View History

2022-10-09 17:48:42 +00:00
import { Guild } from "discord-types/general";
import { ChannelStore, SelectedChannelStore, GuildStore } from "../webpack/common";
export function getCurrentChannel() {
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
}
export function getCurrentGuild(): Guild | undefined {
return GuildStore.getGuild(getCurrentChannel()?.guild_id);
}