Command Only Works In A Category

I know how to make it so a command would only work in one channel, but not one category.

I wanted to make it so whenever someone created a ticket in the ticket channel it would send a welcome message, but I couldn’t find any way to do that (if someone knows how to please tell me).

I moved onto a command that would display the welcome message, but I only want it to work in the ticket category.

Any ideas?

Thanks.

You’re going to want to check for the channel’s parent category, which can be found using channel.parentID or channel.parent

Example:

if (message.channel.parentID === "someCategoryID") { 
    //do stuff here
}
2 Likes

Tysm!

<3 <3 <3
20chars