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

20 lines
519 B
C#
Raw Normal View History

2023-09-21 13:08:27 +00:00
using BotSharp.Abstraction.Conversations.Models;
namespace BotSharp.Plugin.PizzaBot.Functions;
public class GetOrderStatusFn : IFunctionCallback
{
public string Name => "get_order_status";
public async Task<bool> Execute(RoleDialogModel message)
{
message.ExecutionResult = "ready to deliver, will arrived in about 15 minutes.";
message.ExecutionData = new
{
Status = "Ready to deliver",
EstimatedTime = "15 minuts"
};
return true;
}
}