bugfix for ScriptApi

This commit is contained in:
ceikry 2021-07-19 17:00:42 -05:00
parent 77960191ba
commit 8dd806214c

View file

@ -71,7 +71,7 @@ class ScriptAPI(private val bot: Player) {
is Item -> InteractionListener.ITEM
else -> -1
}
val opt: Option? = node.interaction.options.filter { it.name.equals(option, true) }.firstOrNull()
val opt: Option? = node.interaction.options.filter {it != null && it.name.equals(option, true) }.firstOrNull()
if(opt == null){
SystemLogger.logWarn("Invalid option name provided: $option")