diff --git a/README.md b/README.md index 365a6e9b..4b83a690 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +![Build Status](https://ci.codemc.io/job/CodeDoctorDE/job/Linwood/badge/icon) # Linwood Java bot with many features. Developed by @CodeDoctorDE (Discord: CodeDoctor#8719) diff --git a/pom.xml b/pom.xml index ef4aa2e8..7d0dc6b6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.codedoctorde linwood - 1.0 + 1.0.1 11 UTF-8 @@ -174,6 +174,12 @@ icu4j 67.1 + + + org.apache.ant + ant + 1.10.8 + diff --git a/src/main/java/com/github/codedoctorde/linwood/commands/settings/general/RemovePrefixCommand.java b/src/main/java/com/github/codedoctorde/linwood/commands/settings/general/RemovePrefixCommand.java index 30b0a901..87015f18 100644 --- a/src/main/java/com/github/codedoctorde/linwood/commands/settings/general/RemovePrefixCommand.java +++ b/src/main/java/com/github/codedoctorde/linwood/commands/settings/general/RemovePrefixCommand.java @@ -6,6 +6,7 @@ import org.hibernate.Session; import org.jetbrains.annotations.NotNull; +import java.text.MessageFormat; import java.util.Arrays; import java.util.HashSet; import java.util.ResourceBundle; @@ -22,7 +23,8 @@ public boolean onCommand(Session session, Message message, GuildEntity entity, S message.getChannel().sendMessage(bundle.getString("Invalid")).queue(); return true; } - message.getChannel().sendMessage(bundle.getString("Success")).queue(); + entity.save(session); + message.getChannel().sendMessage(MessageFormat.format(bundle.getString("Success"), args[0])).queue(); return true; } diff --git a/src/main/java/com/github/codedoctorde/linwood/listener/CommandListener.java b/src/main/java/com/github/codedoctorde/linwood/listener/CommandListener.java index 35f7f87d..080f9fdd 100644 --- a/src/main/java/com/github/codedoctorde/linwood/listener/CommandListener.java +++ b/src/main/java/com/github/codedoctorde/linwood/listener/CommandListener.java @@ -6,6 +6,7 @@ import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.hooks.SubscribeEvent; +import org.apache.tools.ant.types.Commandline; import javax.annotation.Nonnull; import java.text.MessageFormat; @@ -38,7 +39,7 @@ else if (content.startsWith(nicknameMention)) else if (content.startsWith(normalMention)) split = normalMention; if (split != null) { - var command = content.substring(split.length()).trim().split(" "); + var command = Commandline.translateCommandline(content.substring(split.length())); var bundle = getBundle(guild); var commandBundle = Linwood.getInstance().getBaseCommand().getBundle(guild); try {