Permalink
Browse files

now I actually have to take care of shit that I hardly know how to do

  • Loading branch information...
1 parent cd7ce8f commit 8eebbcf73f83194d5827a016a37a876e34069f5d @Kodehawa committed Feb 17, 2017
@@ -284,7 +284,7 @@ protected void call(String[] args, String content, GuildMessageReceivedEvent eve
}
event.getChannel().sendMessage(":heavy_multiplication_x: Cannot repeat a non-existant track.").queue();
- } catch (Exception e) {
+ } catch (IllegalStateException e) {
event.getChannel().sendMessage(":heavy_multiplication_x: " + "Error -> Not a boolean value").queue();
}
}
@@ -295,6 +295,7 @@ public MessageEmbed help(GuildMessageReceivedEvent event) {
.setDescription("Repeats a song.")
.addField("Usage", "~>repeat <true/false>", false)
.addField("Parameters", "<true/false> true if you want the player to repeat the current track, false otherwise", false)
+ .addField("Warning", "Might not work correctly, if the bot leaves the voice channel after disabling repeat, just add a song to the queue", true)
.build();
}
});
@@ -141,7 +141,7 @@ public void call(String[] args, String content, GuildMessageReceivedEvent event)
"Some of my features include:\n" +
"\u2713 Moderation made easy (``Mass kick/ban, prune commands, logs and more!``)\n" +
"\u2713 Funny and useful commands see `~>help anime` or `~>help action` for examples.\n" +
- "\u2713 Extensive support!"
+ "\u2713 Extensive [support](https://discordapp.com/invite/cMTmuPa)!"
)
.addField("MantaroBot Version", MantaroInfo.VERSION, false)
.addField("Uptime", String.format(
@@ -1,5 +1,6 @@
package net.kodehawa.mantarobot.commands;
+import net.dv8tion.jda.core.entities.IMentionable;
import net.dv8tion.jda.core.entities.MessageEmbed;
import net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent;
import net.kodehawa.mantarobot.modules.Category;
@@ -13,6 +14,7 @@
import java.util.Date;
import java.util.Random;
import java.util.TimeZone;
+import java.util.stream.Collectors;
public class RandomCmds extends Module {
@@ -78,7 +80,8 @@ public MessageEmbed help(GuildMessageReceivedEvent event) {
@Override
protected void call(String[] args, String content, GuildMessageReceivedEvent event) {
- event.getChannel().sendMessage("Y-You lewdie!\r\nhttp://puu.sh/rzVEe/c8272e7c84.png").queue();
+ String lood = event.getMessage().getMentionedUsers().stream().map(IMentionable::getAsMention).collect(Collectors.joining(" "));
+ event.getChannel().sendMessage(lood + " Y-You lewdie!\nhttp://puu.sh/rzVEe/c8272e7c84.png").queue();
}
@Override
@@ -45,13 +45,13 @@ public static boolean connectToVoiceChannel(GuildMessageReceivedEvent event) {
}
if (audioManager.isConnected() && !audioManager.getConnectedChannel().equals(userChannel)) {
- event.getChannel().sendMessage("\u274C I'm already connected on channel **" + audioManager.getConnectedChannel().getName() + "**! (Use the `move` command to move me to another channel)").queue();
+ event.getChannel().sendMessage(String.format("\u274C I'm already connected on channel **%s**! (Use the `move` command to move me to another channel)", audioManager.getConnectedChannel().getName())).queue();
//TODO The ACTUAL ~>move command. (Do this TODO at AudioCmds.java)
return false;
}
if (audioManager.isAttemptingToConnect() && !audioManager.getQueuedAudioConnection().equals(userChannel)) {
- event.getChannel().sendMessage("\u274C I'm already trying to connect to channel **" + audioManager.getQueuedAudioConnection().getName() + "**! (Use the `move` command to move me to another channel)").queue();
+ event.getChannel().sendMessage(String.format("\u274C I'm already trying to connect to channel **%s**! (Use the `move` command to move me to another channel)", audioManager.getQueuedAudioConnection().getName())).queue();
//TODO The ACTUAL ~>move command. (Do this TODO at AudioCmds.java)
return false;
}

0 comments on commit 8eebbcf

Please sign in to comment.