mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-05 00:53:04 +00:00
[AB-166] refactored conditions to not use exceptions for their regular case, split up feature mode exception into condition and exception, if the conditions need to be checked somewhere else, a separate exception is required, fixed command not being disabled properly in channels
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package dev.sheldan.abstracto.modmail.condition.detail;
|
||||
|
||||
import dev.sheldan.abstracto.core.command.condition.ConditionDetail;
|
||||
|
||||
public class NotInModMailThreadConditionDetail implements ConditionDetail {
|
||||
|
||||
@Override
|
||||
public String getTemplateName() {
|
||||
return "modmail_not_in_modmail_thread_condition";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTemplateModel() {
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package dev.sheldan.abstracto.modmail.exception;
|
||||
|
||||
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||
import dev.sheldan.abstracto.templating.Templatable;
|
||||
|
||||
public class NoModMailServerAvailable extends AbstractoRunTimeException implements Templatable {
|
||||
|
||||
public NoModMailServerAvailable() {
|
||||
super("No modmail server available");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTemplateName() {
|
||||
return "modmail_no_server_available_exception";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTemplateModel() {
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package dev.sheldan.abstracto.modmail.exception;
|
||||
|
||||
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||
import dev.sheldan.abstracto.templating.Templatable;
|
||||
|
||||
public class NotInModMailThreadException extends AbstractoRunTimeException implements Templatable {
|
||||
|
||||
@Override
|
||||
public String getTemplateName() {
|
||||
return "modmail_not_in_modmail_thread_exception";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTemplateModel() {
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user