onException

abstract fun onException(@Nullable event: @Nullable Event, @NotNull throwable: @NotNull Throwable)(source)

Note: You are sent a generic Event, you will need to check it against SlashCommandInteractionEvent, GuildMessageReceivedEvent, etc... in order to differentiate events

Parameters

event

The event which triggered this exception

throwable

The throwable which got threw