pxpcorn
pxpcorn

Reputation: 33

How can I check if a user has permissions in a specific voice channel?

I created a command that changes voice permissions, but what I want is if the user doesn't have Manage Channel on that voice channel they can't use it. How do I do this? I know about member.permissions.has() but that doesn't check for permissions in the specific voice channel. Any ideas?

Upvotes: 1

Views: 582

Answers (1)

Lauren Yim
Lauren Yim

Reputation: 14088

The permissionsIn method would be useful here:

member.permissionsIn(theVoiceChannel).has('MANAGE_CHANNELS')

Upvotes: 1

Related Questions