using System.Reflection; namespace RegexBot; /// /// The RegexBot client instance. /// public partial class RegexbotClient { /// /// Gets application instance configuration. /// internal InstanceConfig Config { get; } /// /// Gets the Discord client instance. /// public DiscordSocketClient DiscordClient { get; } /// /// Gets all loaded modules in an iterable form. /// internal IReadOnlyCollection Modules { get; } internal RegexbotClient(InstanceConfig conf, DiscordSocketClient client) { Config = conf; DiscordClient = client; // Get all services started up _svcLogging = new Services.Logging.LoggingService(this); _svcGuildState = new Services.ModuleState.ModuleStateService(this); _svcCommonFunctions = new Services.CommonFunctions.CommonFunctionsService(this); _svcEntityCache = new Services.EntityCache.EntityCacheService(this); var ver = Assembly.GetExecutingAssembly().GetName().Version!.ToString(3); _svcLogging.DoLog(nameof(RegexBot), $"{nameof(RegexBot)} v{ver} - https://github.com/NoiTheCat/RegexBot"); // Load externally defined functionality Modules = ModuleLoader.Load(Config, this); } }