Version 1.4.0 merge from development. #6
2
pom.xml
2
pom.xml
|
@ -70,7 +70,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.andrewlalis</groupId>
|
||||
<artifactId>TengwarTranslatorLibrary</artifactId>
|
||||
<version>1.1</version>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -31,15 +31,15 @@ public class TengwarCommand extends ContextCommand {
|
|||
String result = Translator.translateToTengwar(input);
|
||||
try {
|
||||
context.getChannel().sendFile("Raw text: `" +result+'`', TengwarImageGenerator.generateImage(result,
|
||||
400,
|
||||
20f,
|
||||
600,
|
||||
24f,
|
||||
false,
|
||||
false,
|
||||
System.getProperty("user.home")+"/.handiebot/tengwarTemp.png"));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (context.getArgs()[0].equalsIgnoreCase("to")){
|
||||
} else if (context.getArgs()[0].equalsIgnoreCase("from")){
|
||||
context.getChannel().sendMessage(Translator.translateToEnglish(input));
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -25,7 +25,7 @@ public class RepeatCommand extends ContextCommand {
|
|||
@Override
|
||||
public void execute(CommandContext context) {
|
||||
if (context.getArgs().length == 1 && Commands.hasPermission(context, 8)){
|
||||
boolean shouldRepeat = Boolean.getBoolean(context.getArgs()[0].toLowerCase());
|
||||
boolean shouldRepeat = (context.getArgs()[0].toLowerCase().equals("true"));
|
||||
HandieBot.musicPlayer.setRepeat(context.getGuild(), shouldRepeat);
|
||||
} else {
|
||||
context.getChannel().sendMessage(MessageFormat.format(resourceBundle.getString("player.getRepeat"), HandieBot.musicPlayer.isRepeating(context.getGuild())));
|
||||
|
|
|
@ -25,7 +25,7 @@ public class ShuffleCommand extends ContextCommand {
|
|||
@Override
|
||||
public void execute(CommandContext context) {
|
||||
if (context.getArgs().length == 1 && Commands.hasPermission(context, 8)){
|
||||
boolean shouldShuffle = Boolean.getBoolean(context.getArgs()[0].toLowerCase());
|
||||
boolean shouldShuffle = (context.getArgs()[0].toLowerCase().equals("true"));
|
||||
HandieBot.musicPlayer.setShuffle(context.getGuild(), shouldShuffle);
|
||||
} else {
|
||||
context.getChannel().sendMessage(MessageFormat.format(resourceBundle.getString("player.getShuffle"), HandieBot.musicPlayer.isShuffling(context.getGuild())));
|
||||
|
|
|
@ -5,6 +5,7 @@ import handiebot.view.BotLog;
|
|||
import sx.blah.discord.handle.obj.IChannel;
|
||||
import sx.blah.discord.handle.obj.IMessage;
|
||||
import sx.blah.discord.handle.obj.Permissions;
|
||||
import sx.blah.discord.util.RequestBuffer;
|
||||
|
||||
import static handiebot.HandieBot.log;
|
||||
import static handiebot.HandieBot.resourceBundle;
|
||||
|
@ -29,7 +30,7 @@ public class DisappearingMessage extends Thread implements Runnable {
|
|||
e.printStackTrace();
|
||||
}
|
||||
if (canDelete(sentMessage))
|
||||
sentMessage.delete();
|
||||
RequestBuffer.request(() -> sentMessage.delete());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +46,7 @@ public class DisappearingMessage extends Thread implements Runnable {
|
|||
e.printStackTrace();
|
||||
}
|
||||
if (canDelete(message))
|
||||
message.delete();
|
||||
RequestBuffer.request(() -> message.delete());
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue