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);
|
||
|
}
|