diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java index c04f5e5..9e2b315 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/server/channel/SetTopicSubCommand.java @@ -13,6 +13,7 @@ import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.interactions.commands.OptionType; import net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction; +import net.dv8tion.jda.api.requests.RestRateLimiter; import org.springframework.stereotype.Component; /** @@ -45,11 +46,8 @@ public class SetTopicSubCommand extends BatSubCommand { .queue(); return; } - - textChannel.getManager().setTopic(topic).queue(); - event.replyEmbeds(EmbedUtils.successEmbed() + event.deferReply().queue(voidd -> textChannel.getManager().setTopic(topic).queue((voiddd) -> event.replyEmbeds(EmbedUtils.successEmbed() .setDescription("Successfully set the topic of <#%s> to: \"%s\"".formatted(textChannel.getId(), topic)) - .build() - ).queue(); + .build()).queue())); } } \ No newline at end of file