Exports

exports["ps-discord"]:GetQueueStatus(identifier)

Gets the queue status of a player.

ParameterTypeDescription

identifier

STRING

The identifier of the player to get the queue status of.

ReturnTypeDescription

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.

ParameterTypeDescription

identifier

STRING

The identifier of the player to update the queue priority of.

priority

INT

The new queue priority of the player.

ReturnTypeDescription

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.

ParameterTypeDescription

callback

FUNCTION

The callback function to call when a player is added to the queue.

Example:

exports["ps-discord"]:OnQueueAdded(function(identifier, priority)
    print("Player " .. identifier .. " was added to the queue with priority " .. priority)
end)

――――――――――――――――――――――――――――――――――――――――――――――

exports["ps-discord"]:WebhookSend(webhook, data, callback, wait)

Sends a message to a webhook.

ParameterTypeDescription

webhook

STRING

The webhook to send the message to.

data

TABLE

The data to send to the webhook.

callback

FUNCTION

The callback function to call when the request is done.

wait

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.

ParameterTypeDescription

webhook

STRING

The webhook to edit the message from.

messageId

STRING

The message id to edit.

data

TABLE

The data to send to the webhook.

callback

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.

ParameterTypeDescription

webhook

STRING

The webhook to send the message to.

name

STRING

The name of the embed account sending the messaged

title

STRING

The title of the embed.

color

INT or STRING

The color of the embed.

message

STRING

The message of the embed.

tagEveryone

BOOL

Whether or not to tag everyone in the message.

callback

FUNCTION

The callback function to call when the request is done.

wait

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.

ParameterTypeDescription

webhook

STRING

The webhook to edit the message from.

messageId

STRING

The message id to edit.

name

STRING

The name of the embed account sending the messaged

title

STRING

The title of the embed.

color

INT or STRING

The color of the embed.

message

STRING

The message of the embed.

tagEveryone

BOOL

Whether or not to tag everyone in the message.

callback

FUNCTION

The callback function to call when the request is done.

Last updated