Skip to content

Commit

Permalink
Update alongside Kord
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Nov 23, 2023
1 parent dbcd957 commit 356a371
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import dev.kord.core.entity.Message
import dev.kord.core.entity.channel.GuildMessageChannel
import dev.kord.core.event.message.MessageCreateEvent
import dev.kord.core.event.message.MessageUpdateEvent
import dev.kord.rest.builder.message.create.embed
import dev.kord.rest.builder.message.embed
import io.github.oshai.kotlinlogging.KotlinLogging
import io.ktor.client.*
import io.ktor.client.plugins.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import dev.kord.core.entity.channel.TopGuildMessageChannel
import dev.kord.core.event.message.MessageCreateEvent
import dev.kord.core.event.message.MessageDeleteEvent
import dev.kord.core.event.message.MessageUpdateEvent
import dev.kord.rest.builder.message.create.embed
import dev.kord.rest.builder.message.embed
import dev.kord.rest.request.KtorRequestException
import io.github.oshai.kotlinlogging.KotlinLogging
import kotlinx.coroutines.delay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ import dev.kord.core.behavior.channel.createMessage
import dev.kord.core.behavior.edit
import dev.kord.core.entity.Message
import dev.kord.core.entity.ReactionEmoji
import dev.kord.rest.builder.message.create.allowedMentions
import dev.kord.rest.builder.message.create.embed
import dev.kord.rest.builder.message.modify.allowedMentions
import dev.kord.rest.builder.message.modify.embed
import dev.kord.rest.builder.message.allowedMentions
import dev.kord.rest.builder.message.embed
import java.util.*

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import java.util.*

@Suppress("DEPRECATION", "DEPRECATION_ERROR")
public fun Permission.toTranslationKey(): String? = when (this) {
Permission.CreateEvents -> "permission.createEvents"
Permission.CreateGuildExpressions -> "permission.createGuildExpressions"
Permission.AddReactions -> "permission.addReactions"
Permission.Administrator -> "permission.administrator"
Permission.All -> "permission.all"
Expand All @@ -21,46 +23,44 @@ public fun Permission.toTranslationKey(): String? = when (this) {
Permission.ChangeNickname -> "permission.changeNickname"
Permission.Connect -> "permission.connect"
Permission.CreateInstantInvite -> "permission.createInstantInvite"
Permission.CreatePrivateThreads -> "permission.createPrivateThreads"
Permission.CreatePublicThreads -> "permission.createPublicThreads"
Permission.DeafenMembers -> "permission.deafenMembers"
Permission.EmbedLinks -> "permission.embedLinks"
Permission.KickMembers -> "permission.kickMembers"
Permission.ManageChannels -> "permission.manageChannels"
Permission.ManageGuildExpressions -> "permission.manageExpressions"
Permission.ManageEvents -> "permission.manageEvents"
Permission.ManageGuild -> "permission.manageGuild"
Permission.ManageGuildExpressions -> "permission.manageExpressions"
Permission.ManageMessages -> "permission.manageMessages"
Permission.ManageNicknames -> "permission.manageNicknames"
Permission.ManageRoles -> "permission.manageRoles"
Permission.ManageThreads -> "permission.manageThreads"
Permission.ManageWebhooks -> "permission.manageWebhooks"
Permission.MentionEveryone -> "permission.mentionEveryone"
Permission.ModerateMembers -> "permission.timeoutMembers"
Permission.MoveMembers -> "permission.moveMembers"
Permission.MuteMembers -> "permission.muteMembers"
Permission.PrioritySpeaker -> "permission.prioritySpeaker"
Permission.ReadMessageHistory -> "permission.readMessageHistory"
Permission.RequestToSpeak -> "permission.requestToSpeak"
Permission.SendMessages -> "permission.sendMessages"
Permission.SendMessagesInThreads -> "permission.sendMessagesInThreads"
Permission.SendTTSMessages -> "permission.sendTTSMessages"
Permission.SendVoiceMessages -> "permission.sendVoiceMessages"
Permission.Speak -> "permission.speak"
Permission.Stream -> "permission.stream"
Permission.ModerateMembers -> "permission.timeoutMembers"
Permission.UseApplicationCommands -> "permission.useApplicationCommands"
Permission.UseEmbeddedActivities -> "permission.useEmbeddedActivities"
Permission.UseExternalEmojis -> "permission.useExternalEmojis"
Permission.UseExternalSounds -> "permission.useExternalSounds"
Permission.UseExternalStickers -> "permission.useExternalStickers"
Permission.UseSoundboard -> "permission.useSoundboard"
Permission.UseVAD -> "permission.useVAD"
Permission.ViewAuditLog -> "permission.viewAuditLog"
Permission.ViewChannel -> "permission.viewChannel"
Permission.ViewGuildInsights -> "permission.viewGuildInsights"

Permission.CreatePublicThreads -> "permission.createPublicThreads"
Permission.CreatePrivateThreads -> "permission.createPrivateThreads"
Permission.SendMessagesInThreads -> "permission.sendMessagesInThreads"

Permission.UseExternalStickers -> "permission.useExternalStickers"
Permission.UseEmbeddedActivities -> "permission.useEmbeddedActivities"
Permission.ViewCreatorMonetizationAnalytics -> "permission.viewCreatorMonetizationAnalytics"
Permission.UseSoundboard -> "permission.useSoundboard"
Permission.ViewGuildInsights -> "permission.viewGuildInsights"

is Permission.Unknown -> null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ permission.attachFiles=Attach Files
permission.banMembers=Ban Members
permission.changeNickname=Change Nickname
permission.connect=Connect (Voice)
permission.createEvents=Create Events
permission.createGuildExpressions=Create Expressions
permission.createInstantInvite=Create Invite
permission.createPrivateThreads=Create Private Threads
permission.createPublicThreads=Create Public Threads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ permission.attachFiles=Attach Files
permission.banMembers=Ban Members
permission.changeNickname=Change Nickname
permission.connect=Connect (Voice)
permission.createEvents=Create Events
permission.createGuildExpressions=Create Expressions
permission.createInstantInvite=Create Invite
permission.createPrivateThreads=Create Private Threads
permission.createPublicThreads=Create Public Threads
Expand Down

0 comments on commit 356a371

Please sign in to comment.