Skip to content

Commit ee8a016

Browse files
authored
Use optional chaining for voice channel check
1 parent 9b18235 commit ee8a016

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modules/wheatley/components/moderation/voice-take.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default class VoiceTake extends ModerationComponent {
123123
return;
124124
}
125125
const channel = member.voice.channel;
126-
if (!channel || !channel.isVoiceBased()) {
126+
if (!channel?.isVoiceBased()) {
127127
await this.reply_with_error(command, "You must be in a voice channel to use this command.");
128128
return;
129129
}

0 commit comments

Comments
 (0)