Skip to content

Commit

Permalink
docs: update refs for DiscordLuau/discord-luau@ea0b6b4
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 18, 2024
1 parent 3040028 commit b84ae5e
Show file tree
Hide file tree
Showing 40 changed files with 1,428 additions and 168 deletions.
2 changes: 1 addition & 1 deletion discord-luau
Submodule discord-luau updated 42 files
+10 −10 Package/Classes/DiscordClient.luau
+42 −7 Package/Classes/Network/DiscordGateway.luau
+85 −6 Package/Classes/Network/DiscordShard.luau
+53 −3 Package/Classes/Network/DiscordUDP.luau
+89 −5 Package/Classes/Network/DiscordVoiceConnection.luau
+68 −3 Package/Classes/Network/DiscordWebsocket.luau
+15 −0 Package/Classes/Network/HTTPRatelimit.luau
+30 −0 Package/Classes/Network/HTTPScheduler.luau
+25 −0 Package/Classes/Network/Resolvable.luau
+7 −2 Package/Classes/Network/WebsocketBuffer.luau
+10 −1 Package/Classes/Objects/BaseDiscordChannel.luau
+39 −10 Package/Classes/Objects/BaseDiscordGuildChannel.luau
+15 −6 Package/Classes/Objects/BaseGuildTextChannel.luau
+45 −6 Package/Classes/Objects/BaseGuildThread.luau
+37 −3 Package/Classes/Objects/BaseGuildVoiceChannel.luau
+16 −6 Package/Classes/Objects/BaseUserChannel.luau
+15 −5 Package/Classes/Objects/DiscordApplication.luau
+52 −52 Package/Classes/Objects/DiscordAutomoderationRule.luau
+5 −0 Package/Classes/Objects/DiscordCache.luau
+34 −0 Package/Classes/Objects/DiscordEmoji.luau
+61 −41 Package/Classes/Objects/DiscordGuild.luau
+10 −0 Package/Classes/Objects/DiscordGuildBan.luau
+22 −12 Package/Classes/Objects/DiscordGuildMember.luau
+63 −18 Package/Classes/Objects/DiscordGuildRole.luau
+87 −2 Package/Classes/Objects/DiscordIntegration.luau
+77 −7 Package/Classes/Objects/DiscordInteraction.luau
+59 −1 Package/Classes/Objects/DiscordInvite.luau
+93 −19 Package/Classes/Objects/DiscordMessage.luau
+5 −0 Package/Classes/Objects/DiscordPermission.luau
+54 −0 Package/Classes/Objects/DiscordSticker.luau
+41 −1 Package/Classes/Objects/DiscordUser.luau
+5 −0 Package/Classes/Objects/EndpointCache.luau
+19 −19 Package/Classes/Objects/EventManager.luau
+5 −0 Package/Classes/Objects/GuildForumChannel.luau
+5 −0 Package/Classes/Objects/GuildMediaChannel.luau
+25 −0 Package/Classes/Objects/GuildOnboarding.luau
+36 −1 Package/Classes/Objects/GuildOnboardingPrompt.luau
+39 −14 Package/Classes/Objects/GuildOnboardingPromptOption.luau
+55 −0 Package/Classes/Objects/GuildPreview.luau
+11 −1 Package/Classes/Objects/GuildWelcomeScreen.luau
+30 −0 Package/Classes/Objects/GuildWidget.luau
+21 −1 Package/Classes/Objects/UserGroupChannel.luau
6 changes: 5 additions & 1 deletion src/content/docs/classes/Builders/DiscordPermission.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ import LuaProperty from '$/components/LuaProperty.astro';

## Properties

The DiscordPermission instance has no set properties!
### permissions

<LuaProperty name="DiscordPermission.permissions" type="{ number }" />
---


[//]: # (----- DOCUMENT METHODS ----- )

Expand Down
14 changes: 7 additions & 7 deletions src/content/docs/classes/DiscordClient.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ local DiscordClient = DiscordLuau.DiscordClient.new(SettingsBuilder)

### discordGateway

<LuaProperty name="DiscordClient.discordGateway" type="DiscordGateway" />
<LuaProperty name="DiscordClient.discordGateway" type="Objects.DiscordGateway" />
---

### eventManager

<LuaProperty name="DiscordClient.eventManager" type="EventManager" />
<LuaProperty name="DiscordClient.eventManager" type="Objects.EventManager" />
---


Expand All @@ -54,7 +54,7 @@ local DiscordClient = DiscordLuau.DiscordClient.new(SettingsBuilder)

### connectAsync

> <LuaDeclaration name="connectAsync" className="DiscordClient" args={[ ]} returnType="Future" isMethod />
> <LuaDeclaration name="connectAsync" className="DiscordClient" args={[ ]} returnType="Vendor.Future" isMethod />
Connects the current DiscordClient to the Discord API.

```lua
Expand All @@ -66,19 +66,19 @@ end)
```
### fetchGuildAsync

> <LuaDeclaration name="fetchGuildAsync" className="DiscordClient" args={[ { name: "guildId", type: "string" } ]} returnType="Future<DiscordGuild>" isMethod />
> <LuaDeclaration name="fetchGuildAsync" className="DiscordClient" args={[ { name: "guildId", type: "string" } ]} returnType="Vendor.Future<DiscordGuild>" isMethod />
Fetches a guild by its ID.
### fetchChannelAsync

> <LuaDeclaration name="fetchChannelAsync" className="DiscordClient" args={[ { name: "channelId", type: "string" } ]} returnType="Future<Objects.DiscordChannel>" isMethod />
> <LuaDeclaration name="fetchChannelAsync" className="DiscordClient" args={[ { name: "channelId", type: "string" } ]} returnType="Vendor.Future<Objects.DiscordChannel>" isMethod />
Fetches a channel by its ID.
### updatePresenceAsync

> <LuaDeclaration name="updatePresenceAsync" className="DiscordClient" args={[ { name: "discordPresence", type: "table" } ]} returnType="Future<boolean>" isMethod />
> <LuaDeclaration name="updatePresenceAsync" className="DiscordClient" args={[ { name: "discordPresence", type: "table" } ]} returnType="Vendor.Future<boolean>" isMethod />
Updates the client's presence.
### createGuildAsync

> <LuaDeclaration name="createGuildAsync" className="DiscordClient" args={[ { name: "guildBuilder", type: "Builders.GuildBuilder" } ]} returnType="Future<DiscordGuild>" isMethod />
> <LuaDeclaration name="createGuildAsync" className="DiscordClient" args={[ { name: "guildBuilder", type: "Builders.GuildBuilder" } ]} returnType="Vendor.Future<DiscordGuild>" isMethod />
Creates a Guild, owned by the application.
### setVerbose

Expand Down
38 changes: 31 additions & 7 deletions src/content/docs/classes/Network/DiscordGateway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,31 @@ This class is internal and should not be used directly by developers.

## Properties

The DiscordGateway instance has no set properties!
### discordScheduler

<LuaProperty name="DiscordGateway.discordScheduler" type="Network.HTTPScheduler" />
---

### gatewayEventIn

<LuaProperty name="DiscordGateway.gatewayEventIn" type="Network.EventIn" />
---

### reporter

<LuaProperty name="DiscordGateway.reporter" type="Vendor.Console" />
---

### endpointRateLimits

<LuaProperty name="DiscordGateway.endpointRateLimits" type="{ [string]: HTTPRatelimit.HTTPRatelimit }" />
---

### endpointCaches

<LuaProperty name="DiscordGateway.endpointCaches" type="{ [string]: { [any]: any } }" />
---


[//]: # (----- DOCUMENT METHODS ----- )

Expand All @@ -40,27 +64,27 @@ Parses error messages from the Discord API response.
Parses errors from a Discord API response.
### requestAsync

> <LuaDeclaration name="requestAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "method", type: "string" }, { name: "data", type: "table?" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="requestAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "method", type: "string" }, { name: "data", type: "table?" } ]} returnType="Vendor.Future" isMethod />
Sends an asynchronous request to the Discord API.
### getAsync

> <LuaDeclaration name="getAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="getAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Vendor.Future" isMethod />
Sends an asynchronous GET request to the Discord API.
### postAsync

> <LuaDeclaration name="postAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="postAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Vendor.Future" isMethod />
Sends an asynchronous POST request to the Discord API.
### putAsync

> <LuaDeclaration name="putAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="putAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Vendor.Future" isMethod />
Sends an asynchronous PUT request to the Discord API.
### deleteAsync

> <LuaDeclaration name="deleteAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table?" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="deleteAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table?" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Vendor.Future" isMethod />
Sends an asynchronous DELETE request to the Discord API.
### patchAsync

> <LuaDeclaration name="patchAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="patchAsync" className="DiscordGateway" args={[ { name: "api", type: "string" }, { name: "data", type: "table" }, { name: "headers", type: "{ [string]: string }" } ]} returnType="Vendor.Future" isMethod />
Sends an asynchronous PATCH request to the Discord API.
### setEndpointCache

Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/classes/Network/DiscordShard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@ Observes and handles WebSocket operations.
Initiates the WebSocket connection.
### heartbeatAsync

> <LuaDeclaration name="heartbeatAsync" className="DiscordShard" args={[ { name: "ignoreHeartbeatAck", type: "boolean?" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="heartbeatAsync" className="DiscordShard" args={[ { name: "ignoreHeartbeatAck", type: "boolean?" } ]} returnType="Vendor.Future" isMethod />
Sends a heartbeat to the Discord WebSocket.
### heartbeatIn

> <LuaDeclaration name="heartbeatIn" className="DiscordShard" args={[ { name: "milliseconds", type: "number" } ]} isMethod />
Schedules the next heartbeat.
### identifyAsync

> <LuaDeclaration name="identifyAsync" className="DiscordShard" args={[ ]} returnType="Future" isMethod />
> <LuaDeclaration name="identifyAsync" className="DiscordShard" args={[ ]} returnType="Vendor.Future" isMethod />
Identifies the Discord client with the Discord WebSocket.
### connectAsync

> <LuaDeclaration name="connectAsync" className="DiscordShard" args={[ { name: "websocketUrl", type: "string" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="connectAsync" className="DiscordShard" args={[ { name: "websocketUrl", type: "string" } ]} returnType="Vendor.Future" isMethod />
Connects the DiscordShard to the Discord WebSocket.
### resumeAsync

> <LuaDeclaration name="resumeAsync" className="DiscordShard" args={[ ]} returnType="Future" isMethod />
> <LuaDeclaration name="resumeAsync" className="DiscordShard" args={[ ]} returnType="Vendor.Future" isMethod />
Resumes a previous session with the Discord WebSocket.
### reconnectAsync

> <LuaDeclaration name="reconnectAsync" className="DiscordShard" args={[ ]} returnType="Future" isMethod />
> <LuaDeclaration name="reconnectAsync" className="DiscordShard" args={[ ]} returnType="Vendor.Future" isMethod />
Attempts to reconnect the DiscordShard to the Discord WebSocket.

[//]: # (----- DOCUMENT FUNCTIONS ----- )
Expand Down
137 changes: 133 additions & 4 deletions src/content/docs/classes/Network/DiscordUDP.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,152 @@ This class is internal and should not be used directly by developers.

## Properties

The DiscordUDP instance has no set properties!
### discordWebsocket

<LuaProperty name="DiscordUDP.discordWebsocket" type="Network.DiscordWebsocket" />
---

### websocketUrl

<LuaProperty name="DiscordUDP.websocketUrl" type="string" />
---

### reporter

<LuaProperty name="DiscordUDP.reporter" type="Vendor.Console" />
---

### heartbeatTask

<LuaProperty name="DiscordUDP.heartbeatTask" type="thread?" />
---

### resumeSessionId

<LuaProperty name="DiscordUDP.resumeSessionId" type="string" />
---

### dispatchSequence

<LuaProperty name="DiscordUDP.dispatchSequence" type="number" />
---

### heartbeatInterval

<LuaProperty name="DiscordUDP.heartbeatInterval" type="number" />
---

### heartbeatClockTime

<LuaProperty name="DiscordUDP.heartbeatClockTime" type="number" />
---

### heartbeatPing

<LuaProperty name="DiscordUDP.heartbeatPing" type="number" />
---

### identified

<LuaProperty name="DiscordUDP.identified" type="boolean?" />
---

### resumeGatewayUrl

<LuaProperty name="DiscordUDP.resumeGatewayUrl" type="string" />
---

### heartbeatAck

<LuaProperty name="DiscordUDP.heartbeatAck" type="boolean?" />
---

### activeConnections

<LuaProperty name="DiscordUDP.activeConnections" type="{ unknown }" />
---

### onEvent

<LuaProperty name="DiscordUDP.onEvent" type="Vendor.Signal<string, { [any]: any }>" />
---

### onIdentified

<LuaProperty name="DiscordUDP.onIdentified" type="Vendor.Signal" />
---

### shardId

<LuaProperty name="DiscordUDP.shardId" type="number" />
---

### udpActive

<LuaProperty name="DiscordUDP.udpActive" type="boolean" />
---

### publicUdp

<LuaProperty name="DiscordUDP.publicUdp" type="Nstring" />
---

### onMessageRecv

<LuaProperty name="DiscordUDP.onMessageRecv" type="Vendor.Signal<string>" />
---

### onSocketDead

<LuaProperty name="DiscordUDP.onSocketDead" type="Vendor.Signal<number>" />
---

### socketInstance

<LuaProperty name="DiscordUDP.socketInstance" type="WebSocket" />
---

### reporter

<LuaProperty name="DiscordUDP.reporter" type="Vendor.Console" />
---

### socketUrl

<LuaProperty name="DiscordUDP.socketUrl" type="string" />
---

### socketActive

<LuaProperty name="DiscordUDP.socketActive" type="string" />
---

### socketActiveChanged

<LuaProperty name="DiscordUDP.socketActiveChanged" type="Vendor.Signal<boolean>" />
---

### socketThread

<LuaProperty name="DiscordUDP.socketThread" type="thread?" />
---


[//]: # (----- DOCUMENT METHODS ----- )

## Methods

### sendAsync

> <LuaDeclaration name="sendAsync" className="DiscordUDP" args={[ { name: "dataPacket", type: "string" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="sendAsync" className="DiscordUDP" args={[ { name: "dataPacket", type: "string" } ]} returnType="Vendor.Future" isMethod />
Sends a UDP packet asynchronously.
### connectAsync

> <LuaDeclaration name="connectAsync" className="DiscordUDP" args={[ { name: "discordUdp", type: "string" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="connectAsync" className="DiscordUDP" args={[ { name: "discordUdp", type: "string" } ]} returnType="Vendor.Future" isMethod />
Connects to a UDP socket asynchronously.
### disconnectAsync

> <LuaDeclaration name="disconnectAsync" className="DiscordUDP" args={[ { name: "closingCode", type: "string" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="disconnectAsync" className="DiscordUDP" args={[ { name: "closingCode", type: "string" } ]} returnType="Vendor.Future" isMethod />
Disconnects from the UDP socket asynchronously.

[//]: # (----- DOCUMENT FUNCTIONS ----- )
Expand Down
Loading

0 comments on commit b84ae5e

Please sign in to comment.