From 98e9003129c49037335b5e90a0e6f134b661113e Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 6 Jul 2024 04:14:06 +0100 Subject: [PATCH] update bot joining guild message --- .../bat/features/counter/command/SetBreakingSubCommand.java | 3 +++ src/main/java/cc/fascinated/bat/service/GuildService.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/cc/fascinated/bat/features/counter/command/SetBreakingSubCommand.java b/src/main/java/cc/fascinated/bat/features/counter/command/SetBreakingSubCommand.java index 2ea84df..594cd79 100644 --- a/src/main/java/cc/fascinated/bat/features/counter/command/SetBreakingSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/counter/command/SetBreakingSubCommand.java @@ -73,6 +73,9 @@ public class SetBreakingSubCommand extends BatCommand { breakable ? "now" : "no longer" )) .build()).queue(); + if (channel.getId().equals(textChannel.getId())) { // Don't send in the same channel + return; + } counterChannel.getChannel().sendMessage("The counter will %s break on an invalid or wrong number".formatted( breakable ? "now" : "no longer" )).queue(); diff --git a/src/main/java/cc/fascinated/bat/service/GuildService.java b/src/main/java/cc/fascinated/bat/service/GuildService.java index 0d54480..dc30614 100644 --- a/src/main/java/cc/fascinated/bat/service/GuildService.java +++ b/src/main/java/cc/fascinated/bat/service/GuildService.java @@ -131,6 +131,9 @@ public class GuildService extends ListenerAdapter implements EventListener { To get started, use the command to see all the commands I have to offer! Most of my features are disabled by default, view my features with + + **NOTE: The bot was designed around having administrator permissions, + some features may not work as expected without it.** """.formatted( DiscordService.JDA.getSelfUser().getAsMention(), helpCommand.getInfo().getName(),