Server Events
Messages/SMS
lb-phone:messages:messageSent
Triggered when a message is sent. Please note that attachments is a json encoded array of strings.
-- message: { channelId: number, messageId: number, sender: string, recipient: string, message: string, attachments?: string }
AddEventHandler("lb-phone:messages:messageSent", function(message)
print("New message:", json.encode(message, { indent = true }))
end)
Social media
lb-phone:toggleVerified
-- app: "birdy" | "instapic" | "trendy"
-- username: string
-- verified: boolean
AddEventHandler("lb-phone:toggleVerified", function(app, username, verified)
print("Verified status for", app, username, "is now", verified)
end)
lb-phone:birdy:newPost
-- post: { id: string, username: string, content: string, attachments?: string, reply_to?: string, timestamp: number, replyToAuthor: string, display_name: string, profile_image?: string, verified?: boolean }
AddEventHandler("lb-phone:birdy:newPost", function(post)
print(json.encode(post, { indent = true }))
end)
lb-phone:trendy:newPost
-- post: { id: string, username: string, caption?: string, videoUrl: string }
AddEventHandler("lb-phone:trendy:newPost", function(post)
print(json.encode(post, { indent = true }))
end)
lb-phone:instapic:newPost
-- post: { id: string, username: string, media: string[], caption: string, location?: string }
AddEventHandler("lb-phone:instapic:newPost", function(post)
print(json.encode(post, { indent = true }))
end)
lb-phone:pages:newPost
-- post: { id: string, number: string, title: string, description: string, attachment?: string, price?: number }
AddEventHandler("lb-phone:pages:newPost", function(post)
print(json.encode(post, { indent = true }))
end)
lb-phone:marketplace:newPost
-- post: { id: string, number: string, title: string, description: string, attachments: string[], price: number }
AddEventHandler("lb-phone:marketplace:newPost", function(post)
print(json.encode(post, { indent = true }))
end)
Wallet
lb-phone:onAddTransaction
-- transactionType: "received" | "paid"
-- phoneNumber: string
-- amount: number
-- company?: string
-- logo?: string
AddEventHandler("lb-phone:onAddTransaction", function(transactionType, phoneNumber, amount, company, logo)
print("Transaction added:", receivedPaid, phoneNumber, amount, company, logo)
end)