Bugfix/#105 after autoupdate to last version is cant download anything and keep scanning for no reason #106

Merged
Showing only changes of commit 767b2b35d1 - Show all commits

View file

@ -240,7 +240,11 @@ namespace DML.AppCore.Classes
serverName = socketTextChannel.Guild.Name;
serverName = Path.GetInvalidFileNameChars()
.Aggregate(serverName, (current, c) => current.Replace(c, ' '));
nickname = socketTextChannel.GetUser(message.Author.Id).Nickname;
var serverUser =
socketTextChannel.GetUser(message.Author.Id); // can be null if user left the server
if (serverUser != null)
nickname = serverUser.Nickname;
}
var channelName = message.Channel.Name;