Package-level declarations

Types

Link copied to clipboard
class BBuilder

Entry point for the BotCommands framework.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface BContext

Main context for BotCommands framework.

Link copied to clipboard

Entry point for the BotCommands framework.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface BotOwners

Holds owners of this bot.

Link copied to clipboard

Represents a place where something (usually commands) was declared, used in exception messages.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface DefaultEmbedFooterIconSupplier
Interface for embed footer icons requested by getDefaultIconStream.
Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface DefaultEmbedSupplier
Interface for embeds requested by getDefaultEmbed, aiming to reduce boilerplate.
Link copied to clipboard
interface Executable

Base class for any executable method (commands, components, modals...).

Link copied to clipboard
interface Filter

Base filter interface.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface GlobalExceptionHandler
Interface with a method called everytime the framework catches an uncaught exception.
Link copied to clipboard
@InterfacedService(acceptMultiple = false)
fun interface ICoroutineEventManagerSupplier

Interface to supply a CoroutineEventManager, ran once at startup.

Link copied to clipboard

Holds information on where this object was created at.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
@MissingServiceMessage(message = "A service extending JDAService must exist and has to be in the search path")
abstract class JDAService

Interfaced service to be implemented by the service which creates a JDA instance.

Link copied to clipboard
object Logging

Utilities returning loggers.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface SettingsProvider
Interface for settings requested by the framework, such as prefixes, guild locale or guild commands whitelist.

Functions

Link copied to clipboard
inline fun JDAService.create(token: String, memberCachePolicy: MemberCachePolicy? = null, chunkingFilter: ChunkingFilter? = null, activity: Activity? = null, restConfig: RestConfig? = getDefaultRestConfig(), block: JDABuilder.() -> Unit = {}): JDA
Link copied to clipboard
inline fun JDAService.createSharded(token: String, shardRange: IntRange? = null, shardsTotal: Int = -1, login: Boolean = true, memberCachePolicy: MemberCachePolicy? = null, chunkingFilter: ChunkingFilter? = null, noinline activityProvider: (shardId: Int) -> Activity? = null, restConfig: RestConfig? = getDefaultRestConfig(), block: DefaultShardManagerBuilder.() -> Unit = {}): ShardManager
Link copied to clipboard
fun <T> KLogger.debugNull(throwable: Throwable? = null, block: () -> Any?): T?

Lazy logs if KLogger.isDebugEnabled is true

Link copied to clipboard
inline fun JDAService.default(token: String, memberCachePolicy: MemberCachePolicy? = null, chunkingFilter: ChunkingFilter? = null, activity: Activity? = null, restConfig: RestConfig? = getDefaultRestConfig(), block: JDABuilder.() -> Unit = {}): JDA
Link copied to clipboard
inline fun JDAService.defaultSharded(token: String, shardRange: IntRange? = null, shardsTotal: Int = -1, login: Boolean = true, memberCachePolicy: MemberCachePolicy? = null, chunkingFilter: ChunkingFilter? = null, noinline activityProvider: (shardId: Int) -> Activity? = null, restConfig: RestConfig? = getDefaultRestConfig(), block: DefaultShardManagerBuilder.() -> Unit = {}): ShardManager
Link copied to clipboard
fun <T> KLogger.errorNull(throwable: Throwable? = null, block: () -> Any?): T?

Lazy logs if KLogger.isErrorEnabled is true

Link copied to clipboard
inline fun <A : Annotation> Executable.findAllAnnotations(rootOverride: Boolean = true): List<A>

Finds all annotations of type A from this executable's function.

Link copied to clipboard

Finds all annotations meta-annotated with A from this executable's function.

Link copied to clipboard

Finds a single annotation of type A from this executable's function.

Link copied to clipboard

Returns true if this element is annotated with A.

Link copied to clipboard
fun <T> KLogger.infoNull(throwable: Throwable? = null, block: () -> Any?): T?

Lazy logs if KLogger.isInfoEnabled is true

Link copied to clipboard
inline fun JDAService.light(token: String, memberCachePolicy: MemberCachePolicy? = null, chunkingFilter: ChunkingFilter? = null, activity: Activity? = null, restConfig: RestConfig? = getDefaultRestConfig(), block: JDABuilder.() -> Unit = {}): JDA
Link copied to clipboard
inline fun JDAService.lightSharded(token: String, shardRange: IntRange? = null, shardsTotal: Int = -1, login: Boolean = true, memberCachePolicy: MemberCachePolicy? = null, chunkingFilter: ChunkingFilter? = null, noinline activityProvider: (shardId: Int) -> Activity? = null, restConfig: RestConfig? = getDefaultRestConfig(), block: DefaultShardManagerBuilder.() -> Unit = {}): ShardManager
Link copied to clipboard
fun Any.objectLogger(): KLogger

Returns the KLogger for the class of this object.

Link copied to clipboard
fun <T> KLogger.traceNull(throwable: Throwable? = null, block: () -> Any?): T?

Lazy logs if KLogger.isTraceEnabled is true

Link copied to clipboard
fun <T> KLogger.warnNull(throwable: Throwable? = null, block: () -> Any?): T?

Lazy logs if KLogger.isWarnEnabled is true