Expose a way to register ListenerAdapter to the discordbot
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ plugins {
|
|||||||
allprojects {
|
allprojects {
|
||||||
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
|
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
|
||||||
group = "com.alttd.proxydiscordlink"
|
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."
|
description = "A velocity plugin to link Discord and Minecraft accounts."
|
||||||
|
|
||||||
apply(plugin = "java")
|
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.entities.channel.concrete.TextChannel;
|
||||||
import net.dv8tion.jda.api.exceptions.HierarchyException;
|
import net.dv8tion.jda.api.exceptions.HierarchyException;
|
||||||
import net.dv8tion.jda.api.exceptions.InsufficientPermissionException;
|
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.requests.GatewayIntent;
|
||||||
import net.dv8tion.jda.api.utils.MemberCachePolicy;
|
import net.dv8tion.jda.api.utils.MemberCachePolicy;
|
||||||
import org.jetbrains.annotations.Nullable;
|
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.");
|
ALogger.warn("Unable to ban " + member.getAsMention() + " : " + member.getId() + " from Discord they might be above me.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addListener(ListenerAdapter listenerAdapter) {
|
||||||
|
jda.addEventListener(listenerAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user