Skip to content

Commit 1adc682

Browse files
committed
Fixed an issue with tricks, if no type was found.
1 parent 08fb831 commit 1adc682

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ dependencies {
7676
installer('org.mangorage:installer:4.0.26')
7777
bootstrap("org.mangorage:mangobotbootstrap:1.0.72")
7878

79-
plugin('org.mangorage:mangobot:12.0.80')
79+
plugin('org.mangorage:mangobot:12.0.81')
8080

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

src/main/java/org/mangorage/mangobotplugin/commands/trick/TrickCommand.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ public CommandResult execute(Message message, Arguments args) {
330330
}
331331

332332
trick.setAliasTarget(alias);
333+
} else {
334+
dMessage.apply(message.reply("Trick needs a type! content, script or alias. !trick -a -<type> <stuff>")).queue();
335+
return CommandResult.PASS;
333336
}
334337

335338
trick.setOwnerID(member.getIdLong());
@@ -380,6 +383,9 @@ public CommandResult execute(Message message, Arguments args) {
380383
}
381384

382385
trick.setAliasTarget(alias);
386+
} else {
387+
dMessage.apply(message.reply("Trick needs a type! content, script or alias. !trick -a -<type> <stuff>")).queue();
388+
return CommandResult.PASS;
383389
}
384390

385391
trick.setLastUserEdited(member.getIdLong());

0 commit comments

Comments
 (0)