Search code examples
discordbotslistener

Java Discord Bot: dont execute code in onGuildVoiceMoveEvent-Listener when Member gets moved by the bot itself


@Override
    public void onGuildVoiceMove(@NotNull GuildVoiceMoveEvent event) {
    }

I want that the code inside this Eventlistener doesnt get executed when the bot itself moves the member(not gets moved). I tought of using something like this:

if(!event.getMover().getUser().isBot()){ //getMover doesn't exist just
                                         //.getMember and .getEntity

//Code
}

But i can't find a way to get the Member/User that moves the Member. I'd be very thankful if anyone has any ideas.


Solution

  • This is not Supported by the Discord JDA / Discord API. You can open a Suggestion Issue here or a Suggestion for the official Discord API here