mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-13 19:41:38 +00:00
migrated some exceptions to use templates
fixed missed hard coded value in template fixed listing of channels in channel groups fixed template loading
This commit is contained in:
@@ -7,7 +7,7 @@ import dev.sheldan.abstracto.core.command.config.Parameter;
|
||||
import dev.sheldan.abstracto.core.command.execution.CommandContext;
|
||||
import dev.sheldan.abstracto.core.command.execution.CommandResult;
|
||||
import dev.sheldan.abstracto.core.config.FeatureEnum;
|
||||
import dev.sheldan.abstracto.core.exception.RoleException;
|
||||
import dev.sheldan.abstracto.core.exception.RoleNotFoundInGuildException;
|
||||
import dev.sheldan.abstracto.core.models.database.ARole;
|
||||
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||
import dev.sheldan.abstracto.core.service.RoleService;
|
||||
@@ -45,7 +45,7 @@ public class SetExpRole extends AbstractConditionableCommand {
|
||||
ARole role = roleOpt.get();
|
||||
AServer server = commandContext.getUserInitiatedContext().getServer();
|
||||
if(!roleService.isRoleInServer(role)) {
|
||||
throw new RoleException("Role not found.");
|
||||
throw new RoleNotFoundInGuildException(role.getId(), server.getId());
|
||||
}
|
||||
log.info("Setting role {} to be used for level {} on server {}", roleId, level, server.getId());
|
||||
experienceRoleService.setRoleToLevel(role, level, server, commandContext.getUserInitiatedContext().getChannel());
|
||||
|
||||
Reference in New Issue
Block a user