SecondBot/Core/Commands/Group/GroupActiveTitle.cs
Madpeter 450fe8d317 New command: GroupActiveTitle
Changes the title the bot is using.
2020-05-07 12:51:42 +01:00

31 lines
1.1 KiB
C#

using OpenMetaverse;
using System;
using System.Collections.Generic;
using System.Text;
namespace BSB.Commands.Group
{
class GroupActiveTitle : CoreCommand_2arg
{
public override string[] ArgTypes { get { return new[] { "UUID", "UUID"}; } }
public override string[] ArgHints { get { return new[] { "UUID of the group","UUID of the role" }; } }
public override string Helpfile { get { return "Activates the selected title"; } }
public override bool CallFunction(string[] args)
{
if (base.CallFunction(args) == true)
{
if(UUID.TryParse(args[0],out UUID group_uuid) == true)
{
if (UUID.TryParse(args[0], out UUID group_role) == true)
{
bot.GetClient.Groups.ActivateTitle(group_uuid, group_role);
return true;
}
return Failed("Unable to process group Role on arg 1");
}
return Failed("Unable to process group UUID on arg 1");
}
return false;
}
}
}