Skip to content

Commit 618e648

Browse files
author
Kaleidox
committed
actually listen to events lmao
1 parent 7644cd5 commit 618e648

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/org/comroid/interaction/adapter/jda/JdaAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public JdaAdapter(@NonNull InteractionCore parent, JDA jda) {
6060
this.jda = jda;
6161

6262
addChildren(DiscordNameCapitalizer.INSTANCE, new DiscordCommandRegistrator(this), DiscordResponseChain.INSTANCE);
63+
jda.addEventListener(this);
6364
}
6465

6566
@Override
@@ -127,7 +128,7 @@ private static Object getOptionValue(ParameterNode node, @org.jspecify.annotatio
127128
var type = node.getReflect().getType();
128129
var parser = node.getParameter().parser();
129130

130-
if (!Parameter.Parser.class.equals(parser)) yield Activator.get(parser).createInstance(DataNode.of(Map.of())).parse(str);
131+
if (parser != null && !Parameter.Parser.class.equals(parser)) yield Activator.get(parser).createInstance(DataNode.of(Map.of())).parse(str);
131132

132133
yield type.isEnum() ? Enum.valueOf(Polyfill.uncheckedCast(type), str) : str;
133134
}

0 commit comments

Comments
 (0)