From 6a39973d93e348a87bb4ac9827f782eade3b74dc Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 31 May 2020 22:21:11 +0200 Subject: [PATCH] feat: Discord split channels --- varo/src/main/java/de/cliffbreak/varo/Varo.java | 1 + varo/src/main/java/de/cliffbreak/varo/discord/DiscordBot.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/Varo.java b/varo/src/main/java/de/cliffbreak/varo/Varo.java index 0bf2c66..8571fa6 100644 --- a/varo/src/main/java/de/cliffbreak/varo/Varo.java +++ b/varo/src/main/java/de/cliffbreak/varo/Varo.java @@ -70,6 +70,7 @@ public class Varo extends JavaPlugin { this.config.addDefault("Varo.Debug", false); this.config.addDefault("Varo.Discord.Token", "insert.token.here"); this.config.addDefault("Varo.Discord.Channel", "numeric.channel.id"); + this.config.addDefault("Varo.Discord.BroadcastChannel", "numeric.channel.id"); this.config.addDefault("Varo.RetroHealthRegen", false); this.config.addDefault("Varo.Bans", new ArrayList()); this.config.addDefault("Varo.Border.X", 0); diff --git a/varo/src/main/java/de/cliffbreak/varo/discord/DiscordBot.java b/varo/src/main/java/de/cliffbreak/varo/discord/DiscordBot.java index 9fc788a..d38f9bf 100644 --- a/varo/src/main/java/de/cliffbreak/varo/discord/DiscordBot.java +++ b/varo/src/main/java/de/cliffbreak/varo/discord/DiscordBot.java @@ -31,8 +31,8 @@ public class DiscordBot { } public void broadcastMessage(final String message) { - this.jda.getTextChannelById(this.plugin.getConfig().getString("Varo.Discord.Channel")).sendMessage(message) - .queue(); + this.jda.getTextChannelById(this.plugin.getConfig().getString("Varo.Discord.BroadcastChannel")) + .sendMessage(message).queue(); } private JDA getJDA() {