jda is wank!

This commit is contained in:
Lee 2024-07-04 11:12:42 +01:00
parent 21e7ddf549
commit 05bc0f0a41

@ -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.entities.channel.middleman.MessageChannel;
import net.dv8tion.jda.api.interactions.commands.OptionType; import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction; import net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction;
import net.dv8tion.jda.api.requests.RestRateLimiter;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
@ -45,11 +46,8 @@ public class SetTopicSubCommand extends BatSubCommand {
.queue(); .queue();
return; return;
} }
event.deferReply().queue(voidd -> textChannel.getManager().setTopic(topic).queue((voiddd) -> event.replyEmbeds(EmbedUtils.successEmbed()
textChannel.getManager().setTopic(topic).queue();
event.replyEmbeds(EmbedUtils.successEmbed()
.setDescription("Successfully set the topic of <#%s> to: \"%s\"".formatted(textChannel.getId(), topic)) .setDescription("Successfully set the topic of <#%s> to: \"%s\"".formatted(textChannel.getId(), topic))
.build() .build()).queue()));
).queue();
} }
} }