mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-22 08:09:12 -05:00
11 lines
366 B
TypeScript
11 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);
|
||
|
}
|