addExtension

open suspend fun addExtension(builder: () -> Extension)

Install an Extension to this bot.

This function will call the given builder function and store the resulting extension object, ready to be set up when the next ReadyEvent happens.

Parameters

builder

Builder function (or extension constructor) that takes an ExtensibleBot instance and returns an Extension.