Skip to content

About channel types! #8025

Closed Answered by davipatricio
sebastianjnuwu asked this question in Q&A
Discussion options

You must be logged in to vote

If you are running discordjs@dev, you can create a command normally, and in the channel option, you can use the channelTypes property to tell what types of channels will be allowed.

Example:

client.application.commands.create({
  name: 'test',
  description: 'A test command',
  options: [{
     type: ApplicationCommandOptionType.Channel,
     name: 'channel',
     description: 'Choose a channel.',
     channelTypes: [ChannelType.GuildText]
    }]
  })

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies

This comment was marked as disruptive content.

@sebastianjnuwu
Comment options

@kyranet
Comment options

Comment options

You must be logged in to vote
3 replies
@sebastianjnuwu
Comment options

@sebastianjnuwu
Comment options

@davipatricio
Comment options

Answer selected by kyranet
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants