mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-26 13:46:19 +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());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"title": {
|
||||
"title": "Warnings have been decayed"
|
||||
"title": "<#include "warnDecay_title">"
|
||||
},
|
||||
"color" : {
|
||||
"r": 200,
|
||||
|
||||
@@ -3,7 +3,7 @@ package dev.sheldan.abstracto.modmail.service;
|
||||
import com.jagrosh.jdautilities.commons.waiter.EventWaiter;
|
||||
import com.jagrosh.jdautilities.menu.ButtonMenu;
|
||||
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||
import dev.sheldan.abstracto.core.exception.PostTargetException;
|
||||
import dev.sheldan.abstracto.core.exception.PostTargetNotValidException;
|
||||
import dev.sheldan.abstracto.core.models.FullGuild;
|
||||
import dev.sheldan.abstracto.core.models.FullUser;
|
||||
import dev.sheldan.abstracto.core.models.UndoActionInstance;
|
||||
@@ -398,7 +398,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService {
|
||||
log.error("Failed to log messages for mod mail thread {}.", modMailThreadId, innerThrowable);
|
||||
return null;
|
||||
});
|
||||
} catch (PostTargetException po) {
|
||||
} catch (PostTargetNotValidException po) {
|
||||
log.error("Failed to log mod mail messages", po);
|
||||
sendModMailFailure("modmail_exception_post_target_not_defined", innerModMailThread.getUser(), modMailThreadId, feedBack, po);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user