using Discord.WebSocket;
using Newtonsoft.Json.Linq;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Noikoio.RegexBot
{
///
/// Base class for bot modules
///
abstract class BotModule
{
private readonly DiscordSocketClient _client;
private readonly AsyncLogger _logger;
public string Name => this.GetType().Name;
protected DiscordSocketClient Client => _client;
public BotModule(DiscordSocketClient client)
{
_client = client;
_logger = Logger.GetLogger(this.Name);
}
///
/// Processes module-specific configuration.
/// This method is not called if the user did not provide configuration for the module.
///
///
/// Module code should not hold on to this data, but instead use to retrieve
/// them. This is in the event that configuration is reverted to an earlier state and allows for the
/// all modules to revert to previously used configuration values with no effort on the part of the
/// module code itself.
///
///
/// Processed configuration data prepared for later use.
///
///
/// This method should throw
/// in the event of configuration errors. The exception message will be properly displayed.
///
public abstract Task