SecondBot/Core/Commands/Chat/LocalChatHistory.cs
2021-02-14 17:47:49 +00:00

19 lines
621 B
C#

using System.Linq;
using Newtonsoft.Json;
using OpenMetaverse;
namespace BetterSecondBot.Commands.Chat
{
class LocalChatHistory : CoreCommand_SmartReply_1arg
{
public override string Helpfile { get { return "Gets the last 20 localchat messages the bot has."; } }
public override bool CallFunction(string[] args)
{
if(base.CallFunction(args) == true)
{
return bot.GetCommandsInterface.SmartCommandReply(true, args[0], JsonConvert.SerializeObject(bot.getLocalChatHistory()), CommandName);
}
return false;
}
}
}