2023-08-30 22:40:45 +00:00
|
|
|
using BotSharp.Abstraction.Agents;
|
|
|
|
|
using BotSharp.Plugin.PizzaBot.Hooks;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Plugin.PizzaBot;
|
|
|
|
|
|
|
|
|
|
public class PizzaBotPlugin : IBotSharpPlugin
|
|
|
|
|
{
|
|
|
|
|
public void RegisterDI(IServiceCollection services, IConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
// Register callback function
|
|
|
|
|
services.AddScoped<IFunctionCallback, GetPizzaTypesFn>();
|
|
|
|
|
services.AddScoped<IFunctionCallback, GetPizzaPricesFn>();
|
2023-09-06 03:19:36 +00:00
|
|
|
services.AddScoped<IFunctionCallback, PlaceOrderFn>();
|
2023-08-30 22:40:45 +00:00
|
|
|
services.AddScoped<IFunctionCallback, OrderFoundFn>();
|
2023-09-06 03:19:36 +00:00
|
|
|
services.AddScoped<IFunctionCallback, GetBakingTimeFn>();
|
2023-08-30 22:40:45 +00:00
|
|
|
|
|
|
|
|
// Register hooks
|
|
|
|
|
services.AddScoped<IAgentHook, PizzaBotAgentHook>();
|
|
|
|
|
}
|
|
|
|
|
}
|