Browse Source

[Added] Log Message to play and say

master
Paul Glaß 3 years ago
parent
commit
ce0db66b27
2 changed files with 5 additions and 3 deletions
  1. +2
    -1
      app/src/main/java/de/yannicpunktdee/yoshibot/command/commands/PlayCommand.java
  2. +3
    -2
      app/src/main/java/de/yannicpunktdee/yoshibot/command/commands/SayCommand.java

+ 2
- 1
app/src/main/java/de/yannicpunktdee/yoshibot/command/commands/PlayCommand.java View File

@ -56,7 +56,8 @@ public class PlayCommand extends YoshiCommand {
return false;
}
context.getEvent().getMessage().getTextChannel()
.sendMessage("Spiele '" + requestedFile + "' in '" + vc.getName() + "' ab").queue();
.sendMessage("Danke, " + context.getEvent().getMessage().getAuthor().getName() + ". Spiele '" +
requestedFile + "' in '" + vc.getName() + "' ab").queue();
YoshiBot.getInstance().playSound(file, vc);
}


+ 3
- 2
app/src/main/java/de/yannicpunktdee/yoshibot/command/commands/SayCommand.java View File

@ -8,7 +8,6 @@ import net.dv8tion.jda.api.entities.VoiceChannel;
public class SayCommand extends YoshiCommand {
protected final String[] requiredArguments = {"text", "channel"};
@ -19,7 +18,9 @@ public class SayCommand extends YoshiCommand {
@Override
public boolean execute() {
if (!super.execute()) return false;
context.getEvent().getMessage().getTextChannel().sendMessage(
"Danke, " + context.getEvent().getMessage().getAuthor().getName() + ". Ich werde nun " +
"abspielen:\n" + context.getArgument("text")).queue();
return YoshiBot.getInstance().sayTTS(context.getArgument("text"), getVoiceChannelByParam());
}


Loading…
Cancel
Save