mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-12 09:56:18 +00:00
fixing null handling for server channel message
This commit is contained in:
@@ -20,6 +20,9 @@ public class ServerChannelMessage {
|
||||
}
|
||||
|
||||
public static ServerChannelMessage fromMessage(Message message) {
|
||||
if(message == null) {
|
||||
return null;
|
||||
}
|
||||
return ServerChannelMessage
|
||||
.builder()
|
||||
.serverId(message.getGuild().getIdLong())
|
||||
@@ -29,6 +32,9 @@ public class ServerChannelMessage {
|
||||
}
|
||||
|
||||
public static ServerChannelMessage fromCachedMessage(CachedMessage cachedMessage) {
|
||||
if(cachedMessage == null) {
|
||||
return null;
|
||||
}
|
||||
return ServerChannelMessage
|
||||
.builder()
|
||||
.serverId(cachedMessage.getServerId())
|
||||
|
||||
Reference in New Issue
Block a user