The token used for authentication with the Discord API.
The ID of the guild to check.
The name of the channel to look for.
A promise that resolves to a boolean indicating whether the channel exists.
Will throw an error if the REST API call fails.
const token = 'your_discord_token_here';
const guildId = 'your_guild_id_here';
const channelName = 'general';
isChannelExist(token, guildId, channelName)
.then(exists => console.log(exists ? 'Channel exists.' : 'Channel does not exist.'))
.catch(error => console.error(`Error: ${error.message}`));
Generated using TypeDoc
Checks if a channel with a specified name exists within a guild.