geforkt von SteamWar/BungeeCore
Fix discord command registration
Signed-off-by: Lixfel <git-5w3l@lixfel.de>
Dieser Commit ist enthalten in:
Ursprung
c473182e7f
Commit
47f29e8bc7
@ -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();
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren