mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 11:48:16 +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) {
|
public static ServerChannelMessage fromMessage(Message message) {
|
||||||
|
if(message == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return ServerChannelMessage
|
return ServerChannelMessage
|
||||||
.builder()
|
.builder()
|
||||||
.serverId(message.getGuild().getIdLong())
|
.serverId(message.getGuild().getIdLong())
|
||||||
@@ -29,6 +32,9 @@ public class ServerChannelMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ServerChannelMessage fromCachedMessage(CachedMessage cachedMessage) {
|
public static ServerChannelMessage fromCachedMessage(CachedMessage cachedMessage) {
|
||||||
|
if(cachedMessage == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return ServerChannelMessage
|
return ServerChannelMessage
|
||||||
.builder()
|
.builder()
|
||||||
.serverId(cachedMessage.getServerId())
|
.serverId(cachedMessage.getServerId())
|
||||||
|
|||||||
Reference in New Issue
Block a user