π¬Messages
SendMessageTo
---@param from string The sender's phone number
---@param to string|string[] The recipient phone number(s) - can be a single string or array
---@param message string The message content
---@param attachments string|nil Optional: JSON string of attachments array
---@return table|nil Result object with channelId, messageId, targetSource, timestamp, or nil if failed
local result = exports.yseries:SendMessageTo(
"0881111", -- from (sender's phone number)
"0882222", -- to (recipient's phone number)
"Hello there!" -- message
)
if result then
print("Message sent! ChannelId: " .. result.channelId)
print("MessageId: " .. result.messageId)
print("Timestamp: " .. result.timestamp)
endSendMessage
Last updated