mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-13 19:41:38 +00:00
added templating support
changed ping command to use templates added userjoin/userleave event added guild to command context refactored post target service added logging output to initial loading added server_id to postTarget added leave log postTarget
This commit is contained in:
@@ -23,12 +23,18 @@ public class PostTarget {
|
||||
@Getter
|
||||
private String name;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(name = "id", nullable = false)
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "channel_id", nullable = false)
|
||||
@Getter @Setter
|
||||
private AChannel AChannel;
|
||||
private AChannel channelReference;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name="server_id", nullable = false)
|
||||
@Getter @Setter
|
||||
private AServer serverReference;
|
||||
|
||||
public static String JOIN_LOG = "joinlog";
|
||||
public static String LEAVE_LOG = "leavelog";
|
||||
|
||||
public static List<String> AVAILABLE_POST_TARGETS = Arrays.asList(JOIN_LOG);
|
||||
public static List<String> AVAILABLE_POST_TARGETS = Arrays.asList(JOIN_LOG, LEAVE_LOG);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package dev.sheldan.abstracto.core.service;
|
||||
|
||||
import dev.sheldan.abstracto.core.models.AChannel;
|
||||
import dev.sheldan.abstracto.core.models.AServer;
|
||||
import dev.sheldan.abstracto.core.models.PostTarget;
|
||||
|
||||
public interface PostTargetService {
|
||||
void createPostTarget(String name, AChannel targetChanel);
|
||||
void createOrUpdate(String name, AChannel targetChannel);
|
||||
void updatePostTarget(PostTarget target, AChannel newTargetChannel);
|
||||
void createPostTarget(String name, AChannel targetChanel, AServer server);
|
||||
void createOrUpdate(String name, AChannel targetChannel, AServer server);
|
||||
void createOrUpdate(String name, Long channelId, AServer server);
|
||||
void createOrUpdate(String name, Long channelId, Long serverId);
|
||||
PostTarget getPostTarget(String name, AServer server);
|
||||
void updatePostTarget(PostTarget target, AChannel newTargetChannel, AServer server);
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ import dev.sheldan.abstracto.core.models.AServer;
|
||||
|
||||
public interface ServerService {
|
||||
AServer createServer(Long id);
|
||||
AServer loadServer(Long id);
|
||||
void addChannelToServer(AServer server, AChannel channel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user