Adapt to new bot structure

This commit is contained in:
Marco Realacci 2024-04-04 23:24:06 +02:00
parent ff7e08ada9
commit 3f84e1d831
3414 changed files with 41525 additions and 709 deletions

View file

@ -1,12 +0,0 @@
using Telegram.Bot;
using Telegram.Bot.Types;
namespace SoUnBot.ModuleLoader
{
public interface IModule
{
public string Cmd();
public string GetName();
public void ProcessUpdate(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken);
}
}

View file

@ -1,18 +0,0 @@
namespace SoUnBot.ModuleLoader
{
public class ModuleLoader
{
public Dictionary<string, IModule> Modules { get; private set; }
public ModuleLoader()
{
Modules = new Dictionary<string, IModule>();
}
public void LoadModule(IModule module)
{
if (Modules == null) Modules = new Dictionary<string, IModule>();
Modules.Add(module.Cmd(), module);
}
}
}