15 lines
402 B
C#
15 lines
402 B
C#
using BotSharp.Abstraction.Functions;
|
|
|
|
namespace BotSharp.Core.Routing;
|
|
|
|
public partial class RoutingService
|
|
{
|
|
public async Task<bool> InvokeFunction(string name, RoleDialogModel message)
|
|
{
|
|
var function = _services.GetServices<IFunctionCallback>().FirstOrDefault(x => x.Name == name);
|
|
if (function == null) return false;
|
|
|
|
return await function.Execute(message);
|
|
}
|
|
}
|