All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.freya022.botcommands.api.localization.annotations.LocalizationBundle.kt Maven / Gradle / Ivy

Go to download

A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.

There is a newer version: 3.0.0-alpha.18
Show newest version
package io.github.freya022.botcommands.api.localization.annotations

import io.github.freya022.botcommands.api.localization.context.AppLocalizationContext
import io.github.freya022.botcommands.api.localization.context.TextLocalizationContext

/**
 * Sets the bundle name and path prefix for injected [TextLocalizationContext] / [AppLocalizationContext] parameters
 *
 * @see TextLocalizationContext
 * @see AppLocalizationContext
 */
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
annotation class LocalizationBundle(
    /**
     * Specifies the name of the localization bundle used by the localization context.
     */
    val value: String,

    /**
     * Specifies the prefix used by the localization context.
     *
     * **Example:** If the method is annotated a prefix of `commands.ban` and you ask for `responses.cannot_ban`,
     * then it will search for `commands.ban.responses.cannot_ban`
     */
    val prefix: String = ""
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy