How do I run a function from a hashmap. In this case I'm trying to run the Info.sendInfo function.
abstract class Listener: ListenerAdapter() {
fun checkCommand(args: List<String>, event: MessageReceivedEvent) {
val map: Map<String, Unit> = mapOf(
"!info" to Info.sendInfo(event)
)
map[args[0]].runFunction
}
}