Release/1.0.0 #14

Merged
AstroGD merged 21 commits from release/1.0.0 into main 2022-11-29 03:21:57 +01:00
Showing only changes of commit c9df84b255 - Show all commits

View File

@ -2,11 +2,15 @@ import { GuildBasedChannel, GuildTextBasedChannel, PermissionsBitField } from "d
import client from "../client";
export async function getGuildChannel(guildID: string, channelID: string): Promise<GuildBasedChannel | null> {
try {
const guild = await client.guilds.fetch(guildID);
if (!guild) return null;
const channel = await guild.channels.fetch(channelID);
return channel;
} catch (_error) {
return null;
}
}
export async function getChannelPermission(channel: GuildTextBasedChannel): Promise<Readonly<PermissionsBitField> | null> {