mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-25 11:22:06 +00:00
[AB-128] adding command cooldowns on server/channel group and member level
fixing channel group names being made lower case before storing changing channel group deleted to be sync instead refactoring exceptions and adding exception message to a few fixing channel group incorrect type using the wrong template showing more information in list channel groups command allowing commands to be in any channel group adding concept of channel group types not allowing channels/commands to be in multiple of the same type adding structure to retrieve information about channel groups adding ability to disable channel groups changing loading of member parameter handler to not use cache
This commit is contained in:
@@ -3,4 +3,7 @@ package dev.sheldan.abstracto.modmail.exception;
|
||||
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||
|
||||
public class ModMailThreadChannelNotFound extends AbstractoRunTimeException {
|
||||
public ModMailThreadChannelNotFound() {
|
||||
super("Modmail thread channel not found.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package dev.sheldan.abstracto.repostdetection.listener;
|
||||
|
||||
import dev.sheldan.abstracto.core.listener.DefaultListenerResult;
|
||||
import dev.sheldan.abstracto.core.listener.sync.entity.AsyncChannelGroupDeletedListener;
|
||||
import dev.sheldan.abstracto.core.listener.sync.entity.ChannelGroupDeletedListener;
|
||||
import dev.sheldan.abstracto.core.models.database.AChannelGroup;
|
||||
import dev.sheldan.abstracto.core.models.listener.ChannelGroupDeletedListenerModel;
|
||||
import dev.sheldan.abstracto.core.service.management.ChannelGroupManagementService;
|
||||
@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class RepostCheckAsyncChannelGroupDeletedListener implements AsyncChannelGroupDeletedListener {
|
||||
public class RepostCheckChannelGroupDeletedListener implements ChannelGroupDeletedListener {
|
||||
|
||||
@Autowired
|
||||
private RepostCheckChannelGroupManagement checkChannelGroupManagement;
|
||||
@@ -16,10 +16,10 @@ import org.mockito.junit.MockitoJUnitRunner;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class RepostCheckAsyncChannelGroupDeletedListenerTest {
|
||||
public class RepostCheckChannelGroupDeletedListenerTest {
|
||||
|
||||
@InjectMocks
|
||||
private RepostCheckAsyncChannelGroupDeletedListener testUnit;
|
||||
private RepostCheckChannelGroupDeletedListener testUnit;
|
||||
|
||||
@Mock
|
||||
private RepostCheckChannelGroupManagement checkChannelGroupManagement;
|
||||
@@ -14,6 +14,7 @@ public class TrackedEmoteNotFoundException extends AbstractoRunTimeException imp
|
||||
}
|
||||
|
||||
public TrackedEmoteNotFoundException() {
|
||||
super("Tracked emote not found.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,10 @@ import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||
import dev.sheldan.abstracto.core.templating.Templatable;
|
||||
|
||||
public class NoUrbanDefinitionFoundException extends AbstractoRunTimeException implements Templatable {
|
||||
public NoUrbanDefinitionFoundException() {
|
||||
super("No urban definition found.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTemplateName() {
|
||||
return "no_urban_definition_found_exception";
|
||||
|
||||
@@ -9,6 +9,7 @@ public class YoutubeAPIException extends AbstractoRunTimeException implements Te
|
||||
private final YoutubeAPIExceptionModel model;
|
||||
|
||||
public YoutubeAPIException(Throwable throwable) {
|
||||
super("Youtube api exception.");
|
||||
this.model = YoutubeAPIExceptionModel
|
||||
.builder()
|
||||
.exception(throwable)
|
||||
|
||||
@@ -5,6 +5,10 @@ import dev.sheldan.abstracto.core.templating.Templatable;
|
||||
|
||||
public class YoutubeVideoNotFoundException extends AbstractoRunTimeException implements Templatable {
|
||||
|
||||
public YoutubeVideoNotFoundException() {
|
||||
super("No youtube video found.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTemplateName() {
|
||||
return "webservices_youtube_video_not_found_exception";
|
||||
|
||||
Reference in New Issue
Block a user