Skip to content

Commit

Permalink
new namespaces, fix #5
Browse files Browse the repository at this point in the history
Signed-off-by: shedaniel <daniel@shedaniel.me>
  • Loading branch information
shedaniel committed Jan 24, 2021
1 parent fa07887 commit b29faa9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/kotlin/me/shedaniel/linkie/discord/LinkieBot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ import me.shedaniel.linkie.discord.commands.*
import me.shedaniel.linkie.discord.config.ConfigManager
import me.shedaniel.linkie.discord.tricks.TricksManager
import me.shedaniel.linkie.discord.utils.event
import me.shedaniel.linkie.namespaces.LegacyYarnNamespace
import me.shedaniel.linkie.namespaces.MCPNamespace
import me.shedaniel.linkie.namespaces.MojangNamespace
import me.shedaniel.linkie.namespaces.PlasmaNamespace
import me.shedaniel.linkie.namespaces.YarnNamespace
import me.shedaniel.linkie.namespaces.YarrnNamespace
import java.io.File
import java.util.*

Expand Down Expand Up @@ -69,6 +71,8 @@ fun main() {
start(
LinkieConfig.DEFAULT.copy(
namespaces = listOf(
LegacyYarnNamespace,
YarrnNamespace,
YarnNamespace,
PlasmaNamespace,
MCPNamespace,
Expand Down Expand Up @@ -98,6 +102,16 @@ fun registerCommands(commands: CommandHandler) {
commands.registerCommand(QueryMethodCommand(Namespaces["yarn"]), "ym", "yarnm")
commands.registerCommand(QueryFieldCommand(Namespaces["yarn"]), "yf", "yarnf")

commands.registerCommand(QueryCompoundCommand(Namespaces["legacy-yarn"]), "ly", "legacy-yarn")
commands.registerCommand(QueryClassCommand(Namespaces["legacy-yarn"]), "lyc", "legacy-yarnc")
commands.registerCommand(QueryMethodCommand(Namespaces["legacy-yarn"]), "lym", "legacy-yarnm")
commands.registerCommand(QueryFieldCommand(Namespaces["legacy-yarn"]), "lyf", "legacy-yarnf")

commands.registerCommand(QueryCompoundCommand(Namespaces["yarrn"]), "yarrn")
commands.registerCommand(QueryClassCommand(Namespaces["yarrn"]), "yrc", "yarrnc")
commands.registerCommand(QueryMethodCommand(Namespaces["yarrn"]), "yrm", "yarrnm")
commands.registerCommand(QueryFieldCommand(Namespaces["yarrn"]), "yrf", "yarnrf")

commands.registerCommand(QueryCompoundCommand(Namespaces["mcp"]), "mcp")
commands.registerCommand(QueryClassCommand(Namespaces["mcp"]), "mcpc")
commands.registerCommand(QueryMethodCommand(Namespaces["mcp"]), "mcpm")
Expand Down

0 comments on commit b29faa9

Please sign in to comment.