Add echo message

This commit is contained in:
GregTCLTK 2020-02-20 20:18:07 +01:00
parent b3b542f3b2
commit df636bc32b
No known key found for this signature in database
GPG key ID: A91BADE5C070FF67
2 changed files with 7 additions and 0 deletions

View file

@ -19,6 +19,7 @@ package com.bbn.hadder.commands.music;
import com.bbn.hadder.audio.AudioPlayerSendHandler;
import com.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.managers.AudioManager;
@ -33,6 +34,10 @@ public class EchoCommand implements Command {
audioManager.setSendingHandler(handler);
audioManager.setReceivingHandler(handler);
audioManager.openAudioConnection(e.getMember().getVoiceState().getChannel());
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
"commands.music.echo.success.title",
"commands.music.echo.success.description")
.build()).queue();
} else {
audioManager.closeAudioConnection();
}

View file

@ -277,6 +277,8 @@ commands.music.loop.success.unloop.description = I will no longer repeat the cur
commands.music.loop.error.connected.title = No channel
commands.music.loop.error.connected.description = You have to be in the same voice channel as the bot to set the repeat status.
commands.music.loop.help.description = Repeats a song/queue.
commands.music.echo.success.title = Successfully activated
commands.music.echo.success.description = I will now repeat everything I can hear in your voice channel
commands.music.echo.help.description = Sends your voice through Hadder.
commands.nsfw.gif.error.title = GIF not showing? Click here