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);
}
///
/// This method is called on each module when configuration is (re)loaded.
/// The module is expected to use this opportunity to set up an object that will hold state data
/// for a particular guild, using the incoming configuration object as needed in order to do so.
///
///
/// Module code should not hold on state or configuration data on its own, but instead use
/// to retrieve its state object. This is to provide the user
/// with the ability to maintain the current bot state in the event that a configuration reload fails.
///
///
/// Configuration data for this module, for this guild. Is null if none was defined.
///
/// An object that may later be retrieved by .
public virtual Task