Skip to content

Commit 22da64a

Browse files
committed
Fixed
1 parent 1dfb5f3 commit 22da64a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/org/mangorage/mangobot/MangoBotPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.util.Scanner;
3737
import net.dv8tion.jda.api.entities.channel.ChannelType;
3838
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
39+
import net.dv8tion.jda.api.requests.RestConfig;
3940
import org.mangorage.basicutils.LogHelper;
4041
import org.mangorage.basicutils.config.Config;
4142
import org.mangorage.basicutils.config.ConfigSetting;

src/main/java/org/mangorage/mangobot/core/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static MessageType handleMessage(JDAPlugin plugin, MessageReceivedEvent e
7878
if (rawMessage.length() > 1 && rawMessage.startsWith(cmdPrefix)) {
7979
if (event.getAuthor().isBot()) return new MessageType(false, false);
8080
String[] command_pre = rawMessage.split(" ");
81-
String command = command_pre[0].replaceFirst(cmdPrefix, "");
81+
String command = command_pre[0].substring(cmdPrefix.length());
8282
Arguments arguments = Arguments.of(Arguments.of(command_pre).getFrom(1).split(" "));
8383

8484
var commandEvent = new BasicCommandEvent(event.getMessage(), command, arguments);

0 commit comments

Comments
 (0)