Package dev.kord.core.behavior

Types

ApplicationCommandBehavior
Link copied to clipboard
interface ApplicationCommandBehavior : Entity

The behavior of an Application Command.

ChatInputCommandBehavior
Link copied to clipboard
interface ChatInputCommandBehavior : ApplicationCommandBehavior
GlobalApplicationCommandBehavior
Link copied to clipboard
interface GlobalApplicationCommandBehavior : ApplicationCommandBehavior

The behavior of an Application Command that can be used in DMs and Guilds.

GlobalUserCommandBehavior
Link copied to clipboard
GuildApplicationCommandBehavior
Link copied to clipboard
interface GuildApplicationCommandBehavior : ApplicationCommandBehavior

The behavior of Application Command.

GuildBehavior
Link copied to clipboard
interface GuildBehavior : KordEntity, Strategizable

The behavior of a Discord Guild.

GuildEmojiBehavior
Link copied to clipboard
interface GuildEmojiBehavior : KordEntity, Strategizable

The behavior of a Discord Emoij.

GuildScheduledEventBehavior
Link copied to clipboard
interface GuildScheduledEventBehavior : KordEntity, Strategizable

Behavior of a ADD LINK.

GuildUserCommandBehavior
Link copied to clipboard
MemberBehavior
Link copied to clipboard
interface MemberBehavior : KordEntity, UserBehavior

The behavior of a Discord Member.

MessageBehavior
Link copied to clipboard
interface MessageBehavior : KordEntity, Strategizable

The behavior of a Discord Message.

MessageCommandBehavior
Link copied to clipboard
interface MessageCommandBehavior : ApplicationCommandBehavior
RoleBehavior
Link copied to clipboard
interface RoleBehavior : KordEntity, Strategizable

The behavior of a Discord Role associated to a guild.

StageInstanceBehavior
Link copied to clipboard
interface StageInstanceBehavior : KordEntity, Strategizable
StickerBehavior
Link copied to clipboard
interface StickerBehavior : KordEntity, Strategizable
TemplateBehavior
Link copied to clipboard
interface TemplateBehavior : KordObject
ThreadMemberBehavior
Link copied to clipboard
interface ThreadMemberBehavior : UserBehavior
UserBehavior
Link copied to clipboard
interface UserBehavior : KordEntity, Strategizable

The behavior of a Discord User

UserCommandBehavior
Link copied to clipboard
interface UserCommandBehavior : ApplicationCommandBehavior
WebhookBehavior
Link copied to clipboard
interface WebhookBehavior : KordEntity, Strategizable

The behavior of a Discord Webhook.

Functions

addRole
Link copied to clipboard
@DeprecatedSinceKord(version = "0.7.0")
inline suspend fun GuildBehavior.addRole(builder: RoleCreateBuilder.() -> Unit = {}): Role

Requests to add a new role to this guild.

ban
Link copied to clipboard
inline suspend fun MemberBehavior.ban(builder: BanCreateBuilder.() -> Unit = {})

Requests to ban this member.

inline suspend fun GuildBehavior.ban(userId: Snowflake, builder: BanCreateBuilder.() -> Unit)

Requests to ban the given userId in this guild.

bulkEditSlashCommandPermissions
Link copied to clipboard
inline suspend fun GuildBehavior.bulkEditSlashCommandPermissions(noinline builder: ApplicationCommandPermissionsBulkModifyBuilder.() -> Unit)
createApplicationCommands
Link copied to clipboard
inline suspend fun GuildBehavior.createApplicationCommands(builder: MultiApplicationCommandBuilder.() -> Unit): Flow<GuildApplicationCommand>
createCategory
Link copied to clipboard
@DeprecatedSinceKord(version = "0.7.0")
inline suspend fun GuildBehavior.createCategory(builder: CategoryCreateBuilder.() -> Unit): Category
inline suspend fun GuildBehavior.createCategory(name: String, builder: CategoryCreateBuilder.() -> Unit = {}): Category

Requests to create a new category.

createChatInputCommand
Link copied to clipboard
inline suspend fun GuildBehavior.createChatInputCommand(name: String, description: String, builder: ChatInputCreateBuilder.() -> Unit = {}): GuildChatInputCommand
createEmoji
Link copied to clipboard
@DeprecatedSinceKord(version = "0.7.0")
inline suspend fun GuildBehavior.createEmoji(builder: EmojiCreateBuilder.() -> Unit): GuildEmoji
inline suspend fun GuildBehavior.createEmoji(name: String, image: Image, builder: EmojiCreateBuilder.() -> Unit = {}): GuildEmoji
createGuild
Link copied to clipboard
suspend fun TemplateBehavior.createGuild(name: String, builder: GuildFromTemplateCreateBuilder.() -> Unit): Guild
createMessageCommand
Link copied to clipboard
inline suspend fun GuildBehavior.createMessageCommand(name: String, builder: MessageCommandCreateBuilder.() -> Unit = {}): GuildMessageCommand
createNewsChannel
Link copied to clipboard
@DeprecatedSinceKord(version = "0.7.0")
inline suspend fun GuildBehavior.createNewsChannel(builder: NewsChannelCreateBuilder.() -> Unit): NewsChannel
inline suspend fun GuildBehavior.createNewsChannel(name: String, builder: NewsChannelCreateBuilder.() -> Unit = {}): NewsChannel

Requests to create a new news channel.

createRole
Link copied to clipboard
inline suspend fun GuildBehavior.createRole(builder: RoleCreateBuilder.() -> Unit = {}): Role

Requests to add a new role to this guild.

createScheduledEvent
Link copied to clipboard
suspend fun GuildBehavior.createScheduledEvent(name: String, privacyLevel: GuildScheduledEventPrivacyLevel, scheduledStartTime: Instant, entityType: ScheduledEntityType, builder: ScheduledEventCreateBuilder.() -> Unit): GuildScheduledEvent

Creates a new GuildScheduledEvent.

createTextChannel
Link copied to clipboard
@DeprecatedSinceKord(version = "0.7.0")
inline suspend fun GuildBehavior.createTextChannel(builder: TextChannelCreateBuilder.() -> Unit): TextChannel
inline suspend fun GuildBehavior.createTextChannel(name: String, builder: TextChannelCreateBuilder.() -> Unit = {}): TextChannel

Requests to create a new text channel.

createUserCommand
Link copied to clipboard
inline suspend fun GuildBehavior.createUserCommand(name: String, builder: UserCommandCreateBuilder.() -> Unit = {}): GuildUserCommand
createVoiceChannel
Link copied to clipboard
@DeprecatedSinceKord(version = "0.7.0")
inline suspend fun GuildBehavior.createVoiceChannel(builder: VoiceChannelCreateBuilder.() -> Unit): VoiceChannel
inline suspend fun GuildBehavior.createVoiceChannel(name: String, builder: VoiceChannelCreateBuilder.() -> Unit = {}): VoiceChannel

Requests to create a new voice channel.

edit
Link copied to clipboard
inline suspend fun GuildBehavior.edit(builder: GuildModifyBuilder.() -> Unit): Guild

Requests to edit this guild.

inline suspend fun GuildEmojiBehavior.edit(builder: EmojiModifyBuilder.() -> Unit): GuildEmoji

Requests to edit this emoji.

inline suspend fun GuildScheduledEventBehavior.edit(builder: ScheduledEventModifyBuilder.() -> Unit): GuildScheduledEvent

Requests to modify this event according to the specified builder.

inline suspend fun MemberBehavior.edit(builder: MemberModifyBuilder.() -> Unit): Member

Requests to edit this member.

inline suspend fun MessageBehavior.edit(builder: UserMessageModifyBuilder.() -> Unit): Message

Requests to edit this message.

inline suspend fun RoleBehavior.edit(builder: RoleModifyBuilder.() -> Unit): Role

Requests to edit this role.

inline suspend fun StickerBehavior.edit(builder: StickerModifyBuilder.() -> Unit): Sticker
suspend fun TemplateBehavior.edit(builder: GuildTemplateModifyBuilder.() -> Unit): Template

inline suspend fun WebhookBehavior.edit(builder: WebhookModifyBuilder.() -> Unit): Webhook

Requests to edit the webhook, this user must be the creator.

inline suspend fun WebhookBehavior.edit(token: String, builder: WebhookModifyBuilder.() -> Unit): Webhook

Requests to edit the webhook.

inline suspend fun MessageBehavior.edit(webhookId: Snowflake, token: String, threadId: Snowflake? = null, builder: WebhookMessageModifyBuilder.() -> Unit): Message

Requests to edit this message if it was previously sent from a Webhook with the given webhookId using the token for authentication.

editWebhookMessage
Link copied to clipboard
inline suspend fun MessageBehavior.editWebhookMessage(webhookId: Snowflake, token: String, builder: WebhookMessageModifyBuilder.() -> Unit): Message
editWidget
Link copied to clipboard
inline suspend fun GuildBehavior.editWidget(builder: GuildWidgetModifyBuilder.() -> Unit): GuildWidget
execute
Link copied to clipboard
inline suspend fun WebhookBehavior.execute(token: String, threadId: Snowflake? = null, builder: WebhookMessageCreateBuilder.() -> Unit): Message

Requests to execute this webhook.

executeIgnored
Link copied to clipboard
inline suspend fun WebhookBehavior.executeIgnored(token: String, threadId: Snowflake? = null, builder: WebhookMessageCreateBuilder.() -> Unit)

Requests to execute this webhook.

getApplicationCommandOf
Link copied to clipboard
inline suspend fun <T : GuildApplicationCommand> GuildBehavior.getApplicationCommandOf(commandId: Snowflake): T
getApplicationCommandOfOrNull
Link copied to clipboard
inline suspend fun <T : GuildApplicationCommand> GuildBehavior.getApplicationCommandOfOrNull(commandId: Snowflake): T?
getAuditLogEntries
Link copied to clipboard
inline fun GuildBehavior.getAuditLogEntries(builder: AuditLogGetRequestBuilder.() -> Unit = {}): Flow<AuditLogEntry>

The Audit log entries from this guild, configured by the builder.

getChannelOf
Link copied to clipboard
inline suspend fun <T : GuildChannel> GuildBehavior.getChannelOf(channelId: Snowflake): T

Requests to get the GuildChannel represented by the channelId as type T.

getChannelOfOrNull
Link copied to clipboard
inline suspend fun <T : GuildChannel> GuildBehavior.getChannelOfOrNull(channelId: Snowflake): T?

Requests to get the GuildChannel represented by the channelId as type T, returns null if the GuildChannel isn't present.

GlobalApplicationCommandBehavior
Link copied to clipboard
fun GlobalApplicationCommandBehavior(applicationId: Snowflake, id: Snowflake, service: InteractionService): GlobalApplicationCommandBehavior
GuildApplicationCommandBehavior
Link copied to clipboard
fun GuildApplicationCommandBehavior(guildId: Snowflake, applicationId: Snowflake, id: Snowflake, service: InteractionService): GuildApplicationCommandBehavior
GuildBehavior
Link copied to clipboard
fun GuildBehavior(id: Snowflake, kord: Kord, strategy: EntitySupplyStrategy<*> = kord.resources.defaultStrategy): GuildBehavior
MemberBehavior
Link copied to clipboard
fun MemberBehavior(guildId: Snowflake, id: Snowflake, kord: Kord, strategy: EntitySupplyStrategy<*> = kord.resources.defaultStrategy): MemberBehavior
MessageBehavior
Link copied to clipboard
fun MessageBehavior(channelId: Snowflake, messageId: Snowflake, kord: Kord, strategy: EntitySupplyStrategy<*> = kord.resources.defaultStrategy): MessageBehavior
reply
Link copied to clipboard
inline suspend fun MessageBehavior.reply(builder: UserMessageCreateBuilder.() -> Unit): Message

Request to reply to this message, setting messageReference to this message's id.

requestMembers
Link copied to clipboard
inline fun GuildBehavior.requestMembers(builder: RequestGuildMembersBuilder.() -> Unit = { requestAllMembers() }): Flow<MembersChunkEvent>

Executes a RequestGuildMembers command configured by the builder for guild on this gateway, returning a flow of MembersChunkEvent responses.

RoleBehavior
Link copied to clipboard
fun RoleBehavior(guildId: Snowflake, id: Snowflake, kord: Kord, strategy: EntitySupplyStrategy<*> = kord.resources.defaultStrategy): RoleBehavior
StickerBehavior
Link copied to clipboard
fun StickerBehavior(guildId: Snowflake, id: Snowflake, kord: Kord, supplier: EntitySupplier): StickerBehavior
swapChannelPositions
Link copied to clipboard
inline suspend fun GuildBehavior.swapChannelPositions(builder: GuildChannelPositionModifyBuilder.() -> Unit)

Requests to swap positions of channels in this guild.

swapRolePositions
Link copied to clipboard
inline suspend fun GuildBehavior.swapRolePositions(builder: RolePositionsModifyBuilder.() -> Unit): Flow<Role>

Requests to swap positions of roles in this guild.

TemplateBehavior
Link copied to clipboard
fun TemplateBehavior(guildId: Snowflake, code: String, kord: Kord): TemplateBehavior
ThreadMemberBehavior
Link copied to clipboard
fun ThreadMemberBehavior(id: Snowflake, threadId: Snowflake, kord: Kord, supplier: EntitySupplier = kord.defaultSupplier): ThreadMemberBehavior
UserBehavior
Link copied to clipboard
fun UserBehavior(id: Snowflake, kord: Kord, strategy: EntitySupplyStrategy<*> = kord.resources.defaultStrategy): UserBehavior