Expose a way to register ListenerAdapter to the discordbot

This commit is contained in:
Len
2023-08-01 00:47:23 +02:00
parent 645b019f8d
commit cb4601dbfe
2 changed files with 7 additions and 1 deletions
@@ -15,6 +15,7 @@ import net.dv8tion.jda.api.entities.Role;
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
import net.dv8tion.jda.api.exceptions.HierarchyException;
import net.dv8tion.jda.api.exceptions.InsufficientPermissionException;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.MemberCachePolicy;
import org.jetbrains.annotations.Nullable;
@@ -231,4 +232,9 @@ public class Bot {
ALogger.warn("Unable to ban " + member.getAsMention() + " : " + member.getId() + " from Discord they might be above me.");
}
}
public void addListener(ListenerAdapter listenerAdapter) {
jda.addEventListener(listenerAdapter);
}
}