Fixed an error which caused null pointer exceptions in discord framework and interrupted the scanning queue permanently
Changed message count to acutally count scanned messages even if they already have scanned before
This commit is contained in:
parent
b5945036fd
commit
ef21b6ed05
1 changed files with 4 additions and 3 deletions
|
@ -74,7 +74,8 @@ namespace DML.AppCore.Classes
|
||||||
var channel = FindChannelById(guild, ChannelId);
|
var channel = FindChannelById(guild, ChannelId);
|
||||||
|
|
||||||
Debug("Checking channel access");
|
Debug("Checking channel access");
|
||||||
if (!channel.Users.Contains(channel.Guild.CurrentUser))
|
//channel.GetUser(channel.Guild.CurrentUser.Id);
|
||||||
|
if (channel.GetUser(channel.Guild.CurrentUser.Id) == null)
|
||||||
{
|
{
|
||||||
Info("Skipping channel without access");
|
Info("Skipping channel without access");
|
||||||
return result;
|
return result;
|
||||||
|
@ -126,6 +127,8 @@ namespace DML.AppCore.Classes
|
||||||
if (!IsValid)
|
if (!IsValid)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
Core.Scheduler.MessagesScanned++;
|
||||||
|
|
||||||
Debug($"Processing message {m.Id}");
|
Debug($"Processing message {m.Id}");
|
||||||
if (m.Id < lastId)
|
if (m.Id < lastId)
|
||||||
{
|
{
|
||||||
|
@ -148,8 +151,6 @@ namespace DML.AppCore.Classes
|
||||||
Trace($"Added message {m.Id}");
|
Trace($"Added message {m.Id}");
|
||||||
}
|
}
|
||||||
Debug($"Finished message {m.Id}");
|
Debug($"Finished message {m.Id}");
|
||||||
|
|
||||||
Core.Scheduler.MessagesScanned++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finished = finished || messages.Count < limit;
|
finished = finished || messages.Count < limit;
|
||||||
|
|
Loading…
Add table
Reference in a new issue