Expose a way to register ListenerAdapter to the discordbot
This commit is contained in:
parent
645b019f8d
commit
cb4601dbfe
|
|
@ -7,7 +7,7 @@ plugins {
|
|||
allprojects {
|
||||
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
|
||||
group = "com.alttd.proxydiscordlink"
|
||||
version = "1.0.0-BETA-$build"
|
||||
version = "1.0.1-BETA-$build"
|
||||
description = "A velocity plugin to link Discord and Minecraft accounts."
|
||||
|
||||
apply(plugin = "java")
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user