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

20 lines
523 B
C#
Raw Normal View History

2025-03-28 01:46:01 +00:00
using BotSharp.Abstraction.Conversations.Models;
2023-09-20 10:59:27 +00:00
2025-03-28 01:46:01 +00:00
namespace BotSharp.Plugin.PizzaBot.Functions;
2023-09-20 10:59:27 +00:00
2025-03-28 01:46:01 +00:00
public class MakePaymentFn : IFunctionCallback
{
public string Name => "make_payment";
2023-09-20 10:59:27 +00:00
2025-03-28 01:46:01 +00:00
public async Task<bool> Execute(RoleDialogModel message)
{
message.Content = "Payment proceed successfully. Thank you for your business. Have a great day!";
message.Data = new
{
Transaction = Guid.NewGuid().ToString(),
Status = "Success"
};
return true;
}
}