BotSharp/tests/BotSharp.Plugin.PizzaBot/Functions/GetPizzaPricesFn.cs

20 lines
457 B
C#
Raw Normal View History

2023-08-30 22:40:45 +00:00
using BotSharp.Abstraction.Conversations.Models;
namespace BotSharp.Plugin.PizzaBot.Functions;
public class GetPizzaPricesFn : IFunctionCallback
{
public string Name => "get_pizza_price";
public async Task<bool> Execute(RoleDialogModel message)
{
2023-10-23 00:31:49 +00:00
message.Data = new
2023-08-30 23:29:01 +00:00
{
pepperoni_unit_price = 3.2,
cheese_unit_price = 3.5,
margherita_unit_price = 3.8,
2023-08-30 23:29:01 +00:00
};
2023-08-30 22:40:45 +00:00
return true;
}
}