Exports
exports["ps-discord"]:GetQueueStatus(identifier)
Gets the queue status of a player.
Parameter | Type | Description |
---|---|---|
| STRING | The identifier of the player to get the queue status of. |
Return | Type | Description |
---|---|---|
queueNumber | INT | The queue number of the player. |
queuePriority | INT | The queue priority of the player. |
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:UpdateQueuePriority(identifier, priority)
Updates the queue priority of a player for this load only.
Parameter | Type | Description |
---|---|---|
| STRING | The identifier of the player to update the queue priority of. |
| INT | The new queue priority of the player. |
Return | Type | Description |
---|---|---|
success | BOOL | Whether or not the queue priority was updated. |
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:ForceRefreshQueue()
Forces the queue to refresh everyone's queue number and priority.
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:OnQueueAdded(callback)
Adds a callback to be called when a player is added to the queue.
Parameter | Type | Description |
---|---|---|
| FUNCTION | The callback function to call when a player is added to the queue. |
Example:
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:WebhookSend(webhook, data, callback, wait)
Sends a message to a webhook.
Parameter | Type | Description |
---|---|---|
| STRING | The webhook to send the message to. |
| TABLE | The data to send to the webhook. |
| FUNCTION | The callback function to call when the request is done. |
| BOOL | Set this to true if you wish to edit the message later, this will return the message in the reponse parameter of the callback |
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:WebhookEdit(webhook, message, data, callback)
Edits a message sent by a webhook.
Parameter | Type | Description |
---|---|---|
| STRING | The webhook to edit the message from. |
| STRING | The message id to edit. |
| TABLE | The data to send to the webhook. |
| FUNCTION | The callback function to call when the request is done. |
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:WebhookSendMessage(webhook, name, title, color, message, tagEveryone, callback, wait)
Sends a message to a webhook with a premade embed.
Parameter | Type | Description |
---|---|---|
| STRING | The webhook to send the message to. |
| STRING | The name of the embed account sending the messaged |
| STRING | The title of the embed. |
| INT or STRING | The color of the embed. |
| STRING | The message of the embed. |
| BOOL | Whether or not to tag everyone in the message. |
| FUNCTION | The callback function to call when the request is done. |
| BOOL | Set this to true if you wish to edit the message later, this will return the message in the reponse parameter of the callback |
――――――――――――――――――――――――――――――――――――――――――――――
exports["ps-discord"]:WebhookEditMessage(webhook, messageId, name, title, color, message, tagEveryone, callback)
Edits a message sent by a webhook with a premade embed.
Parameter | Type | Description |
---|---|---|
| STRING | The webhook to edit the message from. |
| STRING | The message id to edit. |
| STRING | The name of the embed account sending the messaged |
| STRING | The title of the embed. |
| INT or STRING | The color of the embed. |
| STRING | The message of the embed. |
| BOOL | Whether or not to tag everyone in the message. |
| FUNCTION | The callback function to call when the request is done. |
Last updated