10 lines
		
	
	
		
			356 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			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;
 | 
						|
} |