SecondBot/Core/Commands/Dialogs/DialogResponce.cs
2020-04-29 04:12:55 +01:00

31 lines
1,020 B
C#

using OpenMetaverse;
using System;
using System.Collections.Generic;
using System.Text;
namespace BSB.Commands.Dialogs
{
class DialogResponce : CoreCommand
{
public override string[] ArgTypes { get { return new[] { "Number","Text" }; } }
public override string[] ArgHints { get { return new[] { "DialogID","Button to click" }; } }
public override string Helpfile { get { return "Makes the bot interact with the dialog [ARG 1] with the button [ARG 2]"; } }
public override int MinArgs { get { return 2; } }
public override bool CallFunction(string[] args)
{
if (base.CallFunction(args) == true)
{
if (int.TryParse(args[0], out int dialogid) == true)
{
return bot.DialogReply(dialogid, args[1]);
}
else
{
return Failed("Invaild dialog id");
}
}
return false;
}
}
}