Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Commit

Permalink
fix voice channel by id (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelScheit committed Sep 27, 2020
1 parent c5f4b20 commit c7a30b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/voice-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class VoiceChannelArgumentType extends ArgumentType {
const matches = val.match(/^([0-9]+)$/);
if(matches) {
try {
const channel = msg.client.channels.cache.resolve(matches[1]);
const channel = msg.client.channels.resolve(matches[1]);
if(!channel || channel.type !== 'voice') return false;
if(arg.oneOf && !arg.oneOf.includes(channel.id)) return false;
return true;
Expand Down

0 comments on commit c7a30b2

Please sign in to comment.