diff --git a/src/de/steamwar/velocitycore/discord/DiscordBot.java b/src/de/steamwar/velocitycore/discord/DiscordBot.java index 895e0201..3015046e 100644 --- a/src/de/steamwar/velocitycore/discord/DiscordBot.java +++ b/src/de/steamwar/velocitycore/discord/DiscordBot.java @@ -187,7 +187,8 @@ public class DiscordBot { updateCommands .addCommands(getCommands() .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)) .complete(); }