From df636bc32b0ccc4a26960c5255330b162875cd3f Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Thu, 20 Feb 2020 20:18:07 +0100 Subject: [PATCH] Add echo message --- src/main/java/com/bbn/hadder/commands/music/EchoCommand.java | 5 +++++ src/main/resources/Translations/Translations_en.properties | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/main/java/com/bbn/hadder/commands/music/EchoCommand.java b/src/main/java/com/bbn/hadder/commands/music/EchoCommand.java index 35beaf4..3af61a9 100644 --- a/src/main/java/com/bbn/hadder/commands/music/EchoCommand.java +++ b/src/main/java/com/bbn/hadder/commands/music/EchoCommand.java @@ -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(); } diff --git a/src/main/resources/Translations/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties index f21bac2..c19c9dc 100644 --- a/src/main/resources/Translations/Translations_en.properties +++ b/src/main/resources/Translations/Translations_en.properties @@ -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