Reorganized files
MessageCache disabled. It will become part of a new feature.
This commit is contained in:
parent
b67716ec94
commit
3780a34b0d
3 changed files with 5 additions and 3 deletions
|
@ -7,11 +7,12 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Noikoio.RegexBot.Feature.DBCache
|
||||
namespace Noikoio.RegexBot.Feature.EntityCache
|
||||
{
|
||||
/// <summary>
|
||||
/// Caches information regarding all known guilds, channels, and users.
|
||||
/// The function of this feature should be transparent to the user, and thus no configuration is needed.
|
||||
/// This feature should be initialized BEFORE any other features that make use of guild and user cache.
|
||||
/// </summary>
|
||||
class EntityCache : BotFeature
|
||||
{
|
||||
|
@ -159,6 +160,8 @@ namespace Noikoio.RegexBot.Feature.DBCache
|
|||
|
||||
foreach (var item in users)
|
||||
{
|
||||
if (item.IsBot || item.IsWebhook) continue;
|
||||
|
||||
uid.Value = item.Id;
|
||||
gid.Value = item.Guild.Id;
|
||||
uname.Value = item.Username;
|
|
@ -48,8 +48,7 @@ namespace Noikoio.RegexBot
|
|||
new Feature.AutoMod.AutoMod(_client),
|
||||
new Feature.ModTools.ModTools(_client),
|
||||
new Feature.AutoRespond.AutoRespond(_client),
|
||||
new Feature.DBCache.EntityCache(_client), // EntityCache goes before anything else that uses its data
|
||||
new Feature.DBCache.MessageCache(_client)
|
||||
new Feature.EntityCache.EntityCache(_client) // EntityCache goes before anything else that uses its data
|
||||
};
|
||||
var dlog = Logger.GetLogger("Discord.Net");
|
||||
_client.Log += async (arg) =>
|
||||
|
|
Loading…
Reference in a new issue