SteamWar/BungeeCore
Archiviert
13
2

Fix discord command registration
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <git-5w3l@lixfel.de>
Dieser Commit ist enthalten in:
Lixfel 2024-06-28 09:19:00 +02:00
Ursprung c473182e7f
Commit 47f29e8bc7

Datei anzeigen

@ -187,7 +187,8 @@ public class DiscordBot {
updateCommands updateCommands
.addCommands(getCommands() .addCommands(getCommands()
.keySet().stream() .keySet().stream()
.map(swCommand -> new CommandData(swCommand, "SteamWar Command").addOptions(new OptionData(OptionType.STRING, ARGUMENT_NAME, "SteamWar arguments", false))) .filter(command -> command.matches("^[\\w-]+$."))
.map(command -> new CommandData(command, "SteamWar Command").addOptions(new OptionData(OptionType.STRING, ARGUMENT_NAME, "SteamWar arguments", false)))
.toArray(CommandData[]::new)) .toArray(CommandData[]::new))
.complete(); .complete();
} }