[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:
Sheldan
2021-04-19 00:25:42 +02:00
parent d540ad80a8
commit 49a9598062
127 changed files with 2325 additions and 189 deletions

View File

@@ -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.");
}
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -14,6 +14,7 @@ public class TrackedEmoteNotFoundException extends AbstractoRunTimeException imp
}
public TrackedEmoteNotFoundException() {
super("Tracked emote not found.");
}
@Override

View File

@@ -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";

View File

@@ -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)

View File

@@ -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";