Skip to content

Commit

Permalink
Translate everything that's already in the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Nov 6, 2024
1 parent 005a692 commit afe48c2
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ suspend fun SlashCommand<*, *, *>.configViewCommand() = ephemeralSubCommand(::Vi
val config = LoggingConfigCollection().getConfig(guild!!.id)
if (config == null) {
respond {
content = Translations.Config.Clear.noConfigLogging.translate()
content = Translations.Config.View.noLoggingConfig.translate()
}
return@action
}
Expand Down Expand Up @@ -215,7 +215,7 @@ suspend fun SlashCommand<*, *, *>.configViewCommand() = ephemeralSubCommand(::Vi
class ViewArgs : Arguments() {
val config by stringChoice {
name = Translations.Config.Arguments.Clear.name
description = Translations.Config.Arguments.Clear.description
description = Translations.Config.Arguments.View.description
choices = mutableMapOf(
Translations.Config.Arguments.Clear.Choice.moderation to ConfigType.MODERATION.name,
Translations.Config.Arguments.Clear.Choice.logging to ConfigType.LOGGING.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,56 @@ import dev.kordex.core.commands.converters.impl.optionalBoolean
import dev.kordex.core.commands.converters.impl.optionalChannel
import dev.kordex.core.commands.converters.impl.optionalRole
import dev.kordex.core.commands.converters.impl.optionalString
import lilybot.i18n.Translations

class ModerationArgs : Arguments() {
val enabled by boolean {
name = "enable-moderation"
description = "Whether to enable the moderation system"
name = Translations.Config.Arguments.Moderation.Enabled.name
description = Translations.Config.Arguments.Moderation.Enabled.description
}

val moderatorRole by optionalRole {
name = "moderator-role"
description = "The role of your moderators, used for pinging in message logs."
name = Translations.Config.Arguments.Moderation.ModeratorRole.name
description = Translations.Config.Arguments.Moderation.ModeratorRole.description
}

val modActionLog by optionalChannel {
name = "action-log"
description = "The channel used to store moderator actions."
name = Translations.Config.Arguments.Moderation.ModActionLog.name
description = Translations.Config.Arguments.Moderation.ModActionLog.description
}

val quickTimeoutLength by coalescingOptionalDuration {
name = "quick-timeout-length"
description = "The length of timeouts to use for quick timeouts"
name = Translations.Config.Arguments.Moderation.QuickTimeout.name
description = Translations.Config.Arguments.Moderation.QuickTimeout.description
}

val warnAutoPunishments by optionalBoolean {
name = "warn-auto-punishments"
description = "Whether to automatically punish users for reach a certain threshold on warns"
name = Translations.Config.Arguments.Moderation.AutoPunish.name
description = Translations.Config.Arguments.Moderation.AutoPunish.description
}

val logPublicly by optionalBoolean {
name = "log-publicly"
description = "Whether to log moderation publicly or not."
name = Translations.Config.Arguments.Moderation.LogPublicly.name
description = Translations.Config.Arguments.Moderation.LogPublicly.description
}

val dmDefault by optionalBoolean {
name = "dm-default"
description = "The default value for whether to DM a user in a ban action or not."
name = Translations.Config.Arguments.Moderation.DmDefault.name
description = Translations.Config.Arguments.Moderation.DmDefault.description
}

val banDmMessage by optionalString {
name = "ban-dm-message"
description = "A custom message to send to users when they are banned."
name = Translations.Config.Arguments.Moderation.BanDm.name
description = Translations.Config.Arguments.Moderation.BanDm.description
}

val autoInviteModeratorRole by optionalBoolean {
name = "auto-invite-moderator-role"
description = "Silently ping moderators to invite them to new threads."
name = Translations.Config.Arguments.Moderation.InviteMods.name
description = Translations.Config.Arguments.Moderation.InviteMods.description
}

val logMemberRoleChanges by optionalBoolean {
name = "log-member-role-changes"
description = "Whether to log changes to the roles members have in a guild."
name = Translations.Config.Arguments.Moderation.RoleChanges.name
description = Translations.Config.Arguments.Moderation.RoleChanges.description
}
}
Loading

0 comments on commit afe48c2

Please sign in to comment.