2022-11-24 15:36:33 +01:00

10 lines
356 B
TypeScript

import { GuildBasedChannel } from "discord.js";
import client from "../client";
export async function getGuildChannel(guildID: string, channelID: string): Promise<GuildBasedChannel | null> {
const guild = await client.guilds.fetch(guildID);
if (!guild) return null;
const channel = await guild.channels.fetch(channelID);
return channel;
}