Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/root' into root
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Feb 28, 2024
2 parents d2a7580 + df4abf6 commit 1c3efb4
Show file tree
Hide file tree
Showing 8 changed files with 479 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class MappingsExtension : Extension() {
slashCommand(
"mcp",
"MCP",
McpNamespaceReplacement,
MCPNamespace,
::MCPArguments
)

Expand Down Expand Up @@ -540,7 +540,7 @@ class MappingsExtension : Extension() {
"feather" -> FeatherNamespace
"hashed-mojang" -> MojangHashedNamespace
"legacy-yarn" -> LegacyYarnNamespace
"mcp" -> McpNamespaceReplacement
"mcp" -> MCPNamespace
"mojang" -> MojangNamespace
"plasma" -> PlasmaNamespace
"quilt-mappings" -> QuiltMappingsNamespace
Expand Down Expand Up @@ -847,8 +847,18 @@ class MappingsExtension : Extension() {
MappingsProvider.empty(arguments.namespace)
}

val defaultVersion = version
?: arguments.namespace.defaultVersion

if (defaultVersion == null) {
respond {
content = translate("command.mapping.nodefault", arguments.namespace.id)
}
return@withContext
}

provider.injectDefaultVersion(
arguments.namespace.getProvider(version ?: arguments.namespace.defaultVersion)
arguments.namespace.getProvider(defaultVersion)
)

sentry.breadcrumb(BreadcrumbType.Info) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

package com.kotlindiscord.kord.extensions.modules.extra.mappings.arguments

import com.kotlindiscord.kord.extensions.modules.extra.mappings.utils.McpNamespaceReplacement
import me.shedaniel.linkie.namespaces.MCPNamespace

/** Arguments for MCP mappings lookup commands. **/
@Suppress("UndocumentedPublicProperty")
class MCPArguments : MappingArguments(McpNamespaceReplacement)
class MCPArguments : MappingArguments(MCPNamespace)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ command.mapping.namespace.description=Configure which namespaces can be used in
command.mapping.namespace.selectmenu=Select the namespaces for conversion commands
command.mapping.namespace.selectmenu.cleared=Namespaces cleared
command.mapping.namespace.selectmenu.updated=**Namespaces updated:** {0}
command.mapping.nodefault=**Error:** no default version could be loaded for namespace {0}. Please specify a version via the `version` argument.
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ command.mapping.namespace.description=Configure which namespaces can be used in
command.mapping.namespace.selectmenu=Select the namespaces for conversion commands
command.mapping.namespace.selectmenu.cleared=Namespaces cleared
command.mapping.namespace.selectmenu.updated=**Namespaces updated:** {0}
command.mapping.nodefault=**Error:** no default version could be loaded for namespace {0}. Please specify a version via the `version` argument.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

import ch.qos.logback.classic.encoder.PatternLayoutEncoder
import ch.qos.logback.core.joran.spi.ConsoleTarget
import ch.qos.logback.core.ConsoleAppender
import ch.qos.logback.core.FileAppender

def environment = System.getenv().getOrDefault("ENVIRONMENT", "production")
def environment = System.getenv("ENVIRONMENT") ?: "dev"
def defaultLevel = TRACE

if (environment == "spam") {
statusListener(OnConsoleStatusListener)

logger("dev.kord.rest.DefaultGateway", TRACE)
} else {
// Silence warning about missing native PRNG
Expand Down
Loading

0 comments on commit 1c3efb4

Please sign in to comment.