Server
Server export functions / types
General
getPlayerByPhone
Gets the player object that follows the bridge getPlayer
structure.
Arguments
Name | Type | Description |
---|---|---|
phoneNumber | string | Phone number |
Example
getPlayerPhone
Gets player's phone object by their ID
Arguments
Name | Type | Description |
---|---|---|
id | number | Player ID |
Example
getPlayerPhoneNumber
Gets player's phone number by their ID
Arguments
Name | Type | Description |
---|---|---|
id | number | Player ID |
Example
sendNotification
Send a notification to a phone or a player
Arguments
Name | Type | Description |
---|---|---|
receiver | string | Player ID or phone number |
data | NotificationData | Notification data |
Example
sendMail
Send mail from either the system or a player. To use HTML, action buttons, etc. you have to send a mail from the system by using one of the reservedUsers
addresses you've configured in the mail app configuration.
Arguments
Name | Type | Description |
---|---|---|
data | MailData | Mail data |
Example
getPlayerMailAccount
Get a player's mail account data
Arguments
Name | Type | Description |
---|---|---|
source | number | Player's ID |
Example
getOfflinePlayerMailAccount
Get an offline player's mail account data by player's identifier
Arguments
Name | Type | Description |
---|---|---|
identifier | string | Player's identifier |
Example
Messages
sendMessage
Send a message to a number from a number
Arguments
Name | Type | Description |
---|---|---|
data | MessageData | Message data |
Example
Types
MessageData
Name | Type | Description |
---|---|---|
sender | string | Sender phone number |
recipient | string | Recipient's phone number |
content | string | Message content |
attachments | Attachment[] | Attachments |
MailData
Name | Type | Description |
---|---|---|
sender | string | Sender phone number |
recipients | string | string[] | Recipient mail addresses |
subject | string | Mail subject |
content | string | Mail content |
attachments | Attachment[] | Attachments |
Last updated on