Solve casting issue
This commit is contained in:
parent
00da991dae
commit
74619a4434
2 changed files with 3 additions and 3 deletions
|
@ -99,7 +99,7 @@ namespace Geekbot.net
|
|||
if (message == null) return;
|
||||
if (message.Channel.Name.StartsWith('@'))
|
||||
{
|
||||
_logger.Information(LogSource.Message, $"[DM-Channel] {message.Content}", SimpleConextConverter.ConvertSocketMessage(message));
|
||||
_logger.Information(LogSource.Message, $"[DM-Channel] {message.Content}", SimpleConextConverter.ConvertSocketMessage(message, true));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ namespace Geekbot.net.Lib.Logger
|
|||
}
|
||||
};
|
||||
}
|
||||
public static MessageDto ConvertSocketMessage(SocketMessage message)
|
||||
public static MessageDto ConvertSocketMessage(SocketMessage message, bool isPrivate = false)
|
||||
{
|
||||
var channel = (SocketGuildChannel) message.Channel;
|
||||
SocketGuildChannel channel = isPrivate ? null : (SocketGuildChannel) message.Channel;
|
||||
return new MessageDto
|
||||
{
|
||||
Message = new MessageDto.MessageContent
|
||||
|
|
Loading…
Reference in a new issue