diff --git a/docs/scripting/trust_scripts/chats.active.mdx b/docs/scripting/trust_scripts/chats.active.mdx new file mode 100644 index 00000000..6bdbe775 --- /dev/null +++ b/docs/scripting/trust_scripts/chats.active.mdx @@ -0,0 +1,63 @@ +--- +title: chats.active +description: "Gets the usernames of recent tells the caller was involved in." +--- + +((chats.active)) returns the 5 most recent users the caller sent and received via [[chats.tell:((chats.tell))]], as well as the 5 most recent channels where messages have been sent via [[chats.send:((chats.send))]]. + +### Security level + +MIDSEC + +## Syntax + +### CLI + +``` +chats.active +``` + +### Script + +``` +#ms.chats.active() +``` + +### Parameters + +No known parameters. + +### Return + +Returns an object. + +#### CLI + +``` +>>chats.active +--Sent-- + +trust +0000 +example_user + +--Received-- + +example_user +boo7_str4p +``` + +#### Script + +``` +{"sent":[{"user":"trust"},{"channel":"0000"},{"user":"example_user"}],"received":[{"user":"example_user"},{"user":"boo7_str4p"}]} +``` + +## Example + +```js +function(context, args) +{ + return #ms.chats.active() +} +```