Skip to content

Commit e57145b

Browse files
Downgrade log severity for failure to enum. overwrites on Channel Update
Also skips removing the event from the list of pending events, so that it is retried on the next task run
1 parent c56a4c3 commit e57145b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tasks/EventTasks.cs

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ await Program.db.HashSetAsync("overrides",
134134
PendingChannelUpdateEvents.Remove(timestamp);
135135
success = true;
136136
}
137+
catch (InvalidOperationException ex)
138+
{
139+
Program.discord.Logger.LogDebug(ex, "Failed to enumerate channel overwrites for channel {channel}; this usually means the permissions were changed while processing a channel event. Will try again on next task run.", e.ChannelAfter.Id);
140+
}
137141
catch (Exception ex)
138142
{
139143
// Log the exception

0 commit comments

Comments
 (0)