mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-11 02:16:23 +00:00
10 lines
366 B
TypeScript
10 lines
366 B
TypeScript
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);
|
|
}
|