allow custom subjects for notecards

This commit is contained in:
Madpeter 2025-06-23 23:03:04 +01:00
parent b5b7a9fac6
commit c410412097

View file

@ -120,17 +120,21 @@ namespace SecondBotEvents.Services
client.Self.InstantMessage(avatar, message); client.Self.InstantMessage(avatar, message);
} }
public bool SendNotecard(string name, string content, UUID sendToUUID, bool attachDateTime=true) public bool SendNotecard(string name, string content, UUID sendToUUID, bool attachDateTime=true, string subject=null)
{ {
bool returnstatus = true; bool returnstatus = true;
if (attachDateTime == true) if (attachDateTime == true)
{ {
name = name + " " + DateTime.Now; name = name + " " + DateTime.Now;
} }
if (subject == null)
{
subject = name + " Created via SecondBot notecard API";
}
client.Inventory.RequestCreateItem( client.Inventory.RequestCreateItem(
client.Inventory.FindFolderForType(AssetType.Notecard), client.Inventory.FindFolderForType(AssetType.Notecard),
name, name,
name + " Created via SecondBot notecard API", subject,
AssetType.Notecard, AssetType.Notecard,
UUID.Random(), UUID.Random(),
InventoryType.Notecard, InventoryType.Notecard,