Files
metabuilder/packages/irc_webchat/scripts/functions.json
johndoe6345789 9284b9a67b Refactor function definitions across multiple packages to remove luaScript references
- Updated functions.json files in theme_editor, ui_auth, ui_footer, ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor packages.
- Removed luaScript entries from function definitions, retaining only category and other relevant metadata.
- Adjusted documentation in prisma/README.md to remove LuaScript entity reference.
2026-01-07 14:54:33 +00:00

165 lines
4.1 KiB
JSON

{
"$schema": "https://metabuilder.dev/schemas/json-script.schema.json",
"schemaVersion": "2.2.0",
"package": "irc_webchat",
"description": "IRC Webchat message handling and command processing functions",
"functions": [
{
"id": "irc_send_message",
"name": "sendMessage",
"exported": true,
"description": "Send a chat message to a channel",
"category": "commands",
"parameters": [
{
"name": "channelId",
"type": "string",
"description": "Channel identifier"
},
{
"name": "username",
"type": "string",
"description": "Username of the sender"
},
{
"name": "userId",
"type": "string",
"description": "User identifier"
},
{
"name": "message",
"type": "string",
"description": "Message content to send"
}
],
"returns": {
"type": "ChatMessage",
"description": "Chat message object"
}
},
{
"id": "irc_handle_command",
"name": "handleCommand",
"exported": true,
"description": "Process IRC commands like /help, /users, /clear, /me",
"category": "commands",
"parameters": [
{
"name": "command",
"type": "string",
"description": "IRC command string (e.g., /help, /users, /clear, /me <action>)"
},
{
"name": "channelId",
"type": "string",
"description": "Channel identifier"
},
{
"name": "username",
"type": "string",
"description": "Current username"
},
{
"name": "onlineUsers",
"type": "array",
"description": "List of online usernames"
}
],
"returns": {
"type": "IRCMessage",
"description": "Response message object"
}
},
{
"id": "irc_format_time",
"name": "formatTime",
"exported": true,
"description": "Format timestamps for display in HH:MM AM/PM format",
"category": "formatting",
"parameters": [
{
"name": "timestamp",
"type": "number",
"description": "Unix timestamp in milliseconds"
}
],
"returns": {
"type": "string",
"description": "Formatted time string in HH:MM AM/PM format"
}
},
{
"id": "irc_user_join",
"name": "userJoin",
"exported": true,
"description": "Handle user joining a channel",
"category": "events",
"parameters": [
{
"name": "channelId",
"type": "string",
"description": "Channel identifier"
},
{
"name": "username",
"type": "string",
"description": "Username of the user joining"
},
{
"name": "userId",
"type": "string",
"description": "User identifier of the user joining"
}
],
"returns": {
"type": "JoinMessage",
"description": "Join notification message object"
}
},
{
"id": "irc_user_leave",
"name": "userLeave",
"exported": true,
"description": "Handle user leaving a channel",
"category": "events",
"parameters": [
{
"name": "channelId",
"type": "string",
"description": "Channel identifier"
},
{
"name": "username",
"type": "string",
"description": "Username of the user leaving"
},
{
"name": "userId",
"type": "string",
"description": "User identifier of the user leaving"
}
],
"returns": {
"type": "LeaveMessage",
"description": "Leave notification message object"
}
},
{
"id": "irc_init",
"name": "init",
"exported": false,
"description": "Lifecycle hooks for installation and removal",
"category": "lifecycle"
}
],
"exports": {
"functions": [
"sendMessage",
"handleCommand",
"formatTime",
"userJoin",
"userLeave"
]
}
}