using RegexBot.Common;
using System.Diagnostics;
namespace RegexBot;
///
/// Base class for a RegexBot module. A module implements a user-facing feature and is expected to directly handle
/// user input (both by means of configuration and incoming Discord events) and process it accordingly.
///
///
/// Implementing classes should not rely on local variables to store runtime or state data for guilds.
/// Instead, use and .
///
public abstract class RegexbotModule {
///
/// Retrieves the bot instance.
///
public RegexbotClient Bot { get; }
///
/// Retrieves the Discord client instance.
///
public DiscordSocketClient DiscordClient { get => Bot.DiscordClient; }
///
/// Called when a module is being loaded.
/// At this point, all bot services are available, but Discord is not. Do not use .
///
public RegexbotModule(RegexbotClient bot) => Bot = bot;
///
/// Gets the name of this module.
///
/// If not overridden, this defaults to the class's name.
public virtual string Name => GetType().Name;
///
/// Called when a guild becomes available during initial load or configuration reload.
/// The implementing class should construct an instance to hold data specific to the corresponding guild for use during runtime.
///
/// Corresponding guild ID for the state data being used. May be useful when reloading.
/// JSON token holding module configuration specific to this guild.
///
/// An object instance containing state and/or configuration information for the guild currently being processed.
///
public abstract Task