mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 00:12:33 +02:00
Adapt to new bot structure
This commit is contained in:
parent
ff7e08ada9
commit
3f84e1d831
3414 changed files with 41525 additions and 709 deletions
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue