jda is wank!
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 40s

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.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()));
}
}