Skip to content

Commit 1c6f226

Browse files
committed
Updated command system to be better....
1 parent 9b391b5 commit 1c6f226

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ dependencies {
7777
bootstrap("org.mangorage:mangobotbootstrap:1.0.84")
7878
launchtarget("org.mangorage:mangobotlaunchtarget:0.1.8")
7979

80-
plugin('org.mangorage:mangobot:12.0.94')
80+
plugin('org.mangorage:mangobot:12.0.96')
8181

8282
library('org.slf4j:slf4j-simple:2.0.13') // Use a recent version)
8383
library('org.luaj:luaj-jme:3.0.1')

src/main/java/org/mangorage/mangobotplugin/commands/PingCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.mangorage.mangobotplugin.commands;
22

33
import net.dv8tion.jda.api.entities.Message;
4+
import org.mangorage.mangobotcore.api.command.v1.CommandParseResult;
45
import org.mangorage.mangobotcore.api.jda.command.v2.AbstractJDACommand;
56
import org.mangorage.mangobotcore.api.jda.command.v2.JDACommandResult;
67

@@ -11,7 +12,7 @@ public PingCommand(String name) {
1112
}
1213

1314
@Override
14-
public JDACommandResult run(Message message, String[] arguments) {
15+
public JDACommandResult run(Message message, String[] arguments, CommandParseResult commandParseResult) {
1516
message.reply("Pong!").queue();
1617
return JDACommandResult.PASS;
1718
}

src/main/java/org/mangorage/mangobotplugin/commands/PingsCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import net.dv8tion.jda.api.entities.Message;
55
import net.dv8tion.jda.api.entities.MessageEmbed;
66

7+
import org.mangorage.mangobotcore.api.command.v1.CommandParseResult;
78
import org.mangorage.mangobotcore.api.jda.command.v2.AbstractJDACommand;
89
import org.mangorage.mangobotcore.api.jda.command.v2.JDACommandResult;
910
import java.awt.*;
@@ -26,7 +27,7 @@ public PingsCommand(String name) {
2627
}
2728

2829
@Override
29-
public JDACommandResult run(Message message, String[] arguments) {
30+
public JDACommandResult run(Message message, String[] arguments, CommandParseResult commandParseResult) {
3031
var referenced = message.getReferencedMessage();
3132
if (referenced == null) {
3233
message.getChannel().sendMessageEmbeds(EMBED).queue();

0 commit comments

Comments
 (0)