RegexBot/Services/Service.cs
Noi 1149f2800d Reorganized project
Moved modules into the assembly itself to simplify development of
further features and reduce complexity in building this project.

Additionally, many small adjustments were made, including:
- Add documentation to most public methods that had it missing
- Minor style updates
- Updated readme to reflect near-completion of this rewrite
- Remove any last remaining references to old project name Kerobot
- Update dependencies
2022-07-20 18:55:08 -07:00

22 lines
859 B
C#

namespace RegexBot.Services;
/// <summary>
/// Base class for services.
/// </summary>
/// <remarks>
/// Services provide core and shared functionality for this program. Modules are expected to call into services
/// directly or indirectly in order to access bot features.
/// </remarks>
internal abstract class Service {
public RegexbotClient BotClient { get; }
public string Name => GetType().Name;
public Service(RegexbotClient bot) => BotClient = bot;
/// <summary>
/// Emits a log message.
/// </summary>
/// <param name="message">The log message to send. Multi-line messages are acceptable.</param>
/// <param name="report">Specify if the log message should be sent to a reporting channel.</param>
protected void Log(string message, bool report = false) => BotClient._svcLogging.DoLog(report, Name, message);
}