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

commonMain.entity.application.MessageCommand.kt Maven / Gradle / Ivy

The newest version!
package dev.kord.core.entity.application

import dev.kord.common.entity.Snowflake
import dev.kord.core.behavior.GlobalMessageCommandBehavior
import dev.kord.core.behavior.GuildMessageCommandBehavior
import dev.kord.core.behavior.MessageCommandBehavior
import dev.kord.core.cache.data.ApplicationCommandData
import dev.kord.rest.service.InteractionService

public sealed interface MessageCommand : ApplicationCommand, MessageCommandBehavior

public class GlobalMessageCommand(override val data: ApplicationCommandData, override val service: InteractionService) :
    GlobalApplicationCommand,
    MessageCommand,
    GlobalMessageCommandBehavior

public class GuildMessageCommand(override val data: ApplicationCommandData, override val service: InteractionService) :
    GuildApplicationCommand,
    MessageCommand,
    GuildMessageCommandBehavior {
    override val guildId: Snowflake
        get() = data.guildId.value!!
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy