RegexBot/RegexbotClient.cs
Noi ebdaa6482c Remove 'report' option in logging
The feature was previously meant for monitoring errors in a large public
bot instance, but is massively redundant and even annoying when using
as a self-hosted instance.
Besides, the information it did report was excessive and of little use.
2022-07-27 19:23:49 -07:00

39 lines
1.3 KiB
C#

using System.Reflection;
namespace RegexBot;
/// <summary>
/// The RegexBot client instance.
/// </summary>
public partial class RegexbotClient {
/// <summary>
/// Gets application instance configuration.
/// </summary>
internal InstanceConfig Config { get; }
/// <summary>
/// Gets the Discord client instance.
/// </summary>
public DiscordSocketClient DiscordClient { get; }
/// <summary>
/// Gets all loaded modules in an iterable form.
/// </summary>
internal IReadOnlyCollection<RegexbotModule> 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);
}
}