Implemented skeleton of chatbot init

This commit is contained in:
Chomp
2025-01-18 12:39:42 +00:00
parent 2d0d8d6d0b
commit 8d632e9bb2
4 changed files with 142 additions and 25 deletions
+39 -4
View File
@@ -1,15 +1,50 @@
using Core.Annotations;
using Core.Annotations;
using Core.Helpers.Dialog.Commando;
using Core.Models.Eft.Dialog;
using Core.Models.Eft.Profile;
using Core.Models.Enums;
using Core.Models.Spt.Config;
using Core.Models.Utils;
using Core.Servers;
using Core.Services;
namespace Core.Helpers.Dialogue;
[Injectable]
public class SptDialogueChatBot : IDialogueChatBot
public class SptDialogueChatBot : AbstractDialogChatBot
{
public UserDialogInfo GetChatBot()
protected ISptLogger<AbstractDialogChatBot> _logger;
protected ConfigServer _configServer;
protected CoreConfig _coreConfig;
public SptDialogueChatBot(
ISptLogger<AbstractDialogChatBot> logger,
MailSendService mailSendService,
IEnumerable<IChatCommand> chatCommands,
ConfigServer configServer
) : base(logger, mailSendService, chatCommands)
{
throw new NotImplementedException();
_logger = logger;
_configServer = configServer;
_coreConfig = configServer.GetConfig<CoreConfig>();
}
public override UserDialogInfo GetChatBot()
{
return new UserDialogInfo
{
Id = _coreConfig.Features.ChatbotFeatures.Ids["spt"],
Aid = 1234566,
Info = new UserDialogDetails
{
Level = 1,
MemberCategory = MemberCategory.DEVELOPER,
SelectedMemberCategory = MemberCategory.DEVELOPER,
Nickname = _coreConfig.SptFriendNickname,
Side = "Usec"
}
};
}
public string HandleMessage(string sessionId, SendMessageRequest request)