TextCommandsContext

@InterfacedService(acceptMultiple = false)
interface TextCommandsContext(source)

Helps to get the registered text commands.

Properties

Link copied to clipboard
Link copied to clipboard

Returns the consumer that customizes the built-in help command's content.

Link copied to clipboard
Link copied to clipboard
open val prefixes: List<String>

Returns the full list of prefixes used to trigger the bot.

Link copied to clipboard
Link copied to clipboard
abstract val textConfig: BTextConfig

Functions

Link copied to clipboard
abstract fun findTextCommand(words: List<String>): TextCommandInfo?
Link copied to clipboard
Link copied to clipboard
abstract fun getDefaultPrefixes(): List<String>

Returns the configured prefixes and the bot mention if enabled.

Link copied to clipboard

Returns the prefixes this bot responds to in the specified guild, or an empty list if the bot shouldn't respond to anything.

Link copied to clipboard
open fun getPreferredPrefix(jda: JDA): String?

Returns the preferred prefix for triggering this bot, or null if BTextConfig.usePingAsPrefix is disabled and no prefix was added in BTextConfig.prefixes.

Returns the preferred prefix this bot is able to respond to, in the specified guild, or null if no prefix could be determined, in which case text commands are not usable.