cancel

abstract fun cancel(cause: Throwable?)(source)
open fun cancel()(source)

Close the Bot. A closed Bot cannot be started again, nor can it push or process events.

Also closes apiClient and the internal long polling client.