mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-01-04 08:42:42 +00:00
[OPB-xxx] updating versions and classes
This commit is contained in:
@@ -17,6 +17,7 @@ import dev.sheldan.oneplus.bot.modules.faq.config.FAQFeatureDefinition;
|
||||
import dev.sheldan.oneplus.bot.modules.faq.config.FAQModuleDefinition;
|
||||
import dev.sheldan.oneplus.bot.modules.faq.models.command.faq.FAQResponseModel;
|
||||
import dev.sheldan.oneplus.bot.modules.faq.service.FAQResponseServiceBean;
|
||||
import net.dv8tion.jda.api.entities.GuildMessageChannel;
|
||||
import net.dv8tion.jda.api.entities.TextChannel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -50,7 +51,7 @@ public class FAQ extends AbstractConditionableCommand {
|
||||
String commandName;
|
||||
if(!parameters.isEmpty()) {
|
||||
commandName = (String) parameters.get(0);
|
||||
TextChannel channel;
|
||||
GuildMessageChannel channel;
|
||||
if (parameters.size() == 2) {
|
||||
channel = (TextChannel) parameters.get(1);
|
||||
} else {
|
||||
|
||||
@@ -22,10 +22,7 @@ import dev.sheldan.oneplus.bot.modules.faq.service.management.FAQChannelGroupCom
|
||||
import dev.sheldan.oneplus.bot.modules.faq.service.management.FAQCommandAliasManagementService;
|
||||
import dev.sheldan.oneplus.bot.modules.faq.service.management.FAQCommandManagementServiceBean;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.dv8tion.jda.api.entities.ISnowflake;
|
||||
import net.dv8tion.jda.api.entities.SelfUser;
|
||||
import net.dv8tion.jda.api.entities.TextChannel;
|
||||
import net.dv8tion.jda.api.entities.User;
|
||||
import net.dv8tion.jda.api.entities.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -67,7 +64,7 @@ public class FAQResponseServiceBean {
|
||||
@Autowired
|
||||
private FAQResponseServiceBean self;
|
||||
|
||||
public CompletableFuture<FAQResponseModel> loadFAQResponse(String commandName, TextChannel textChannel) {
|
||||
public CompletableFuture<FAQResponseModel> loadFAQResponse(String commandName, GuildMessageChannel textChannel) {
|
||||
AServer server = serverManagementService.loadServer(textChannel.getGuild().getIdLong());
|
||||
Optional<FAQCommand> faqCommandOptional = faqCommandManagementServiceBean.findByNameAndServer(commandName, server);
|
||||
if(!faqCommandOptional.isPresent()) {
|
||||
|
||||
Reference in New Issue
Block a user