AutoMod rule processing to the thread pool
It was originally like that, but was changed to be synchronous during debugging. I may have forgotten to revert it before committing. Also, removed note for future asynchronous response processing. Synchronous response execution is expected behavior at this point.
This commit is contained in:
parent
3c88bce94a
commit
85f694ba7d
1 changed files with 2 additions and 4 deletions
|
@ -58,10 +58,9 @@ namespace Noikoio.RegexBot.Feature.AutoMod
|
||||||
|
|
||||||
foreach (var rule in rules)
|
foreach (var rule in rules)
|
||||||
{
|
{
|
||||||
// Checking for mod bypass here (Rule doesn't have access to mod list)
|
// Checking for mod bypass here (Rule.Match isn't able to access mod list)
|
||||||
bool isMod = IsModerator(ch.Guild.Id, m);
|
bool isMod = IsModerator(ch.Guild.Id, m);
|
||||||
//await Task.Run(async () => await ProcessMessage(m, rule, isMod));
|
await Task.Run(async () => await ProcessMessage(m, rule, isMod));
|
||||||
await ProcessMessage(m, rule, isMod);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +76,6 @@ namespace Noikoio.RegexBot.Feature.AutoMod
|
||||||
|
|
||||||
foreach (Response resp in r.Response)
|
foreach (Response resp in r.Response)
|
||||||
{
|
{
|
||||||
// TODO foreach await (when that becomes available)
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await resp.Invoke(m);
|
await resp.Invoke(m);
|
||||||
|
|
Loading…
Reference in a new issue