Skip to content

Commit

Permalink
Make join voice channel event check case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Lindgren committed Jul 29, 2021
1 parent 257f1ff commit 9c303db
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.github.langebangen.kensa.listener;

import discord4j.core.GatewayDiscordClient;
import discord4j.core.object.VoiceState;
import discord4j.core.object.entity.Member;
import discord4j.core.object.entity.channel.VoiceChannel;
import reactor.core.publisher.Mono;

import com.github.langebangen.kensa.audio.VoiceConnections;
import com.github.langebangen.kensa.listener.event.JoinVoiceChannelEvent;
import com.github.langebangen.kensa.listener.event.LeaveVoiceChannelEvent;
import com.github.langebangen.kensa.listener.event.ReconnectVoiceChannelEvent;
import com.google.inject.Inject;
import discord4j.core.GatewayDiscordClient;
import discord4j.core.object.VoiceState;
import discord4j.core.object.entity.Member;
import discord4j.core.object.entity.channel.VoiceChannel;
import reactor.core.publisher.Mono;

/**
* @author Martin.
Expand Down Expand Up @@ -49,7 +48,8 @@ private void onChannelJoin()
else
{
vcToJoin = guild.getChannels().ofType(VoiceChannel.class)
.filter(channel -> channel.getName().equals(event.getVoiceChannelNameToJoin()))
.filter(channel -> channel.getName().trim().equalsIgnoreCase(
event.getVoiceChannelNameToJoin().trim()))
.singleOrEmpty();
}

Expand Down

0 comments on commit 9c303db

Please sign in to comment.