Event listeners only work for concrete types
At the moment, BotClient event listeners use the typeOf
intrinsic to compare event types with the type they listen to. While a function does exist to determine if a KType
is a subtype of another KType
, this function only exists on JVM, and so it is unavailable to us. Because of this, event listeners that have a non-concrete type (such as the Event
interface, which all events inherit from) will never trigger. An issue on the Kotlin YouTrack is open and assigned for this task here.
Edited by Campbell Jones