📱 Social Media Events
Y App
yseries:server:y:new-tweet
Triggered when a new tweet is posted on the Y app.
Event Data:
lua
Usage Example:
lua
Notes:
- The
attachmentsfield is a table/array that may contain photos or other media - The
replyTofield is set when replying to an existing tweet, otherwise it'snil - The
playerIdentifiercan benilif the player is not found
Instashots
yseries:server:instashots:on-new-post
Triggered when a new post is created on Instashots.
Event Data:
lua
Note: The post ID is not included in the event data, but the post is already saved to the database when this event fires.
Usage Example:
lua
Notes:
- The
attachments.mediafield is an array of media URLs/photos - The
attachments.taggedPeoplefield contains an array of usernames that were tagged in the post - Tagged people are automatically converted to usernames only (not full user objects)
News
yseries:server:news:new-article
Triggered when a new news article is created and published.
Event Data:
lua
Usage Example:
lua
Notes:
- Only users with permission to create news articles can trigger this event
- The
imageUrlsfield is a JSON-encoded array of image URLs - The article is automatically broadcast to all clients after creation
YBuy (Marketplace)
yseries:server:ybuy:on-new-ad
Triggered when a new advertisement is created on YBuy marketplace.
Event Data:
lua
Usage Example:
lua
Notes:
- The
attachmentsfield is a JSON-encoded string that needs to be decoded to access attachment data - The
pricefield is sanitized before being saved to the database - The ad is immediately available in the marketplace after creation
PromoHub
yseries:server:promoHub:on-new-ad
Triggered when a new promotional advertisement is created on PromoHub.
Event Data:
lua
Usage Example:
lua
Notes:
- Title and contact name are automatically trimmed to 50 characters
- Description is automatically trimmed to 5000 characters
- The
attachmentsfield is a JSON-encoded string that needs to be decoded to access attachment data