refactor(bot): remove saving own user ID from ready event, rely on ID in config

This commit is contained in:
spiral
2022-09-06 09:52:37 +00:00
parent aeb6411b6c
commit 9303dbb91e
17 changed files with 51 additions and 69 deletions

View File

@@ -49,8 +49,8 @@ public class BotModule: Module
var botConfig = c.Resolve<BotConfig>();
if (botConfig.UseRedisCache)
return new RedisDiscordCache(c.Resolve<ILogger>());
return new MemoryDiscordCache();
return new RedisDiscordCache(c.Resolve<ILogger>(), botConfig.ClientId);
return new MemoryDiscordCache(botConfig.ClientId);
}).AsSelf().SingleInstance();
builder.RegisterType<PrivateChannelService>().AsSelf().SingleInstance();