Skip to content

Commit

Permalink
docs: update refs for DiscordLuau/discord-luau@359282c
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 4, 2024
1 parent 7557433 commit 5ebbf63
Show file tree
Hide file tree
Showing 30 changed files with 1,029 additions and 374 deletions.
2 changes: 1 addition & 1 deletion discord-luau
Submodule discord-luau updated 53 files
+6 −25 Examples/Development.luau
+7 −5 Package/Classes/Builders/ActivityBuilder.luau
+2 −2 Package/Classes/Builders/AttachmentBuilder.luau
+8 −6 Package/Classes/Builders/AutomoderationRuleBuilder.luau
+429 −0 Package/Classes/Builders/ChannelBuilder.luau
+9 −7 Package/Classes/Builders/CommandBuilder.luau
+7 −5 Package/Classes/Builders/CommandOptionBuilder.luau
+2 −2 Package/Classes/Builders/EmbedBuilder.luau
+9 −7 Package/Classes/Builders/MessageBuilder.luau
+3 −3 Package/Classes/Builders/ModalBuilder.luau
+3 −3 Package/Classes/Builders/PresenceBuilder.luau
+10 −5 Package/Classes/Builders/SettingsBuilder.luau
+4 −4 Package/Classes/DiscordClient.luau
+1 −1 Package/Classes/Network/DiscordGateway.luau
+13 −11 Package/Classes/Network/DiscordVoiceConnection.luau
+60 −0 Package/Classes/Objects/BaseDiscordChannel.luau
+352 −0 Package/Classes/Objects/BaseDiscordGuildChannel.luau
+177 −0 Package/Classes/Objects/BaseGuildTextChannel.luau
+188 −0 Package/Classes/Objects/BaseGuildThread.luau
+92 −0 Package/Classes/Objects/BaseGuildVoiceChannel.luau
+183 −0 Package/Classes/Objects/BaseUserChannel.luau
+0 −156 Package/Classes/Objects/DiscordAnnouncementChannel.luau
+0 −1 Package/Classes/Objects/DiscordApplication.luau
+64 −329 Package/Classes/Objects/DiscordChannel.luau
+0 −161 Package/Classes/Objects/DiscordForumChannel.luau
+3 −3 Package/Classes/Objects/DiscordGuild.luau
+3 −3 Package/Classes/Objects/DiscordInteraction.luau
+0 −161 Package/Classes/Objects/DiscordMediaChannel.luau
+7 −0 Package/Classes/Objects/DiscordMessage.luau
+38 −0 Package/Classes/Objects/DiscordPermission.luau
+0 −168 Package/Classes/Objects/DiscordTextChannel.luau
+0 −207 Package/Classes/Objects/DiscordThreadChannel.luau
+0 −149 Package/Classes/Objects/DiscordVoiceChannel.luau
+47 −0 Package/Classes/Objects/GuildAnnouncementChannel.luau
+47 −0 Package/Classes/Objects/GuildAnnouncementThreadChannel.luau
+44 −0 Package/Classes/Objects/GuildCategoryChannel.luau
+44 −0 Package/Classes/Objects/GuildDirectoryChannel.luau
+50 −0 Package/Classes/Objects/GuildForumChannel.luau
+50 −0 Package/Classes/Objects/GuildMediaChannel.luau
+44 −0 Package/Classes/Objects/GuildPrivateThreadChannel.luau
+44 −0 Package/Classes/Objects/GuildPublicThreadChannel.luau
+47 −0 Package/Classes/Objects/GuildStageVoiceChannel.luau
+44 −0 Package/Classes/Objects/GuildTextChannel.luau
+44 −0 Package/Classes/Objects/GuildVoiceChannel.luau
+43 −0 Package/Classes/Objects/UserDMChannel.luau
+71 −0 Package/Classes/Objects/UserGroupChannel.luau
+4 −0 Package/Data/DiscordEndpoints.luau
+0 −18 Package/Enums/CacheType.luau
+21 −0 Package/Enums/ChannelType.luau
+80 −0 Package/Utils/Extend.luau
+35 −4 Package/init.luau
+1 −1 aftman.toml
+13 −2 init.luau
145 changes: 145 additions & 0 deletions src/content/docs/classes/Builders/ChannelBuilder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: ChannelBuilder
description: DiscordLuau docs for ChannelBuilder.
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
[//]: # (to the discord-luau repository itself, we extract the comments from discord-luau and translate)
[//]: # (them into markdown files that Nextra can interpret!)

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

import LuaDeclaration from '$/components/LuaDeclaration.astro';
import LuaProperty from '$/components/LuaProperty.astro';

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



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

## Properties

### Type

<LuaProperty name="ChannelBuilder.Type" type="table" />
---
An enumeration of activity types.

- Game: 0
- Streaming: 1
- Listening: 2
- Watching: 3
- Competing: 5
### VideoQualityMode

<LuaProperty name="ChannelBuilder.VideoQualityMode" type="table" />
---
An enumeration of activity types.

- QualityAuto: 1
- Quality720p: 2
### SortOrder

<LuaProperty name="ChannelBuilder.SortOrder" type="table" />
---
An enumeration of activity types.

- LatestActivity: 0
- CreationDate: 1
### ForumLayout

<LuaProperty name="ChannelBuilder.ForumLayout" type="table" />
---
An enumeration of activity types.

- NotSet: 0
- ListView: 1
- GalleryView: 2

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

## Methods

### setType

> <LuaDeclaration name="setType" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the type of the current discord channel.
### setBitrate

> <LuaDeclaration name="setBitrate" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the bitrate of the current discord voice channel.
### setRegion

> <LuaDeclaration name="setRegion" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the region of the current discord voice channel.
### setVideoQualityMode

> <LuaDeclaration name="setVideoQualityMode" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the Video Quality Mode of a discord voice channel
### addMemberOverwrite

> <LuaDeclaration name="addMemberOverwrite" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets an overwrite for a Member, allowing you to define allowed permissions, alongside dissallowed permissions.
### addRoleOverwrite

> <LuaDeclaration name="addRoleOverwrite" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets an overwrite for a Role, allowing you to define allowed permissions, alongside dissallowed permissions.
### setDefaultReaction

> <LuaDeclaration name="setDefaultReaction" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the default reaction for Forum and Media channels.
### setDefaultSortOrder

> <LuaDeclaration name="setDefaultSortOrder" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the default sort order for Forum and Media channels.
### setDefaultForumLayout

> <LuaDeclaration name="setDefaultForumLayout" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the Default layout for Forum channels.
### setPosition

> <LuaDeclaration name="setPosition" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the name of the Discord Channel
### setPosition

> <LuaDeclaration name="setPosition" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the position of a Discord Channel, the position determines the position the channel appears in the channel hierarchy.
### setTopic

> <LuaDeclaration name="setTopic" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the topic of a Discord Channel.
### setNSFW

> <LuaDeclaration name="setNSFW" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Locks the channel to be NSFW only.
### setRateLimitPerUser

> <LuaDeclaration name="setRateLimitPerUser" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the rate limit per user for a discord channel.
### setParentCategoryId

> <LuaDeclaration name="setParentCategoryId" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the parent category of a discord channel.
### setDefaultAutoArchiveDuration

> <LuaDeclaration name="setDefaultAutoArchiveDuration" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the default archive duration for a discord channel.
### setDefaultThreadRateLimitPerUser

> <LuaDeclaration name="setDefaultThreadRateLimitPerUser" className="ChannelBuilder" args={[ ]} returnType="Builders.ChannelBuilder" isMethod />
Sets the default thread limit for each user in a discord channel.
### toPayloadObject

> <LuaDeclaration name="toPayloadObject" className="ChannelBuilder" args={[ ]} returnType="Network.Resolvable" isMethod />
Converts the activity to a JSON object that can be sent to the Discord API.

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

## Functions

### new

> <LuaDeclaration name="new" className="ChannelBuilder" args={[ ]} />
Creates a new instance of ChannelBuilder.

36 changes: 36 additions & 0 deletions src/content/docs/classes/Builders/DiscordPermission.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: DiscordPermission
description: DiscordLuau docs for DiscordPermission.
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
[//]: # (to the discord-luau repository itself, we extract the comments from discord-luau and translate)
[//]: # (them into markdown files that Nextra can interpret!)

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

import LuaDeclaration from '$/components/LuaDeclaration.astro';
import LuaProperty from '$/components/LuaProperty.astro';

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



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

## Properties

The DiscordPermission instance has no set properties!

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

## Methods

The DiscordPermission instance has no set methods!

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

## Functions

The DiscordPermission instance has no set functions!

3 changes: 3 additions & 0 deletions src/content/docs/classes/DiscordLuau.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ A Discord API wrapper written in Luau, expected to run under the Lune runtime.
### MessageBuilder

<LuaProperty name="DiscordLuau.MessageBuilder" type="Builders.MessageBuilder" />
### ChannelBuilder

<LuaProperty name="DiscordLuau.ChannelBuilder" type="Builders.ChannelBuilder" />
### AttachmentBuilder

<LuaProperty name="DiscordLuau.AttachmentBuilder" type="Builders.AttachmentBuilder" />
Expand Down
39 changes: 39 additions & 0 deletions src/content/docs/classes/Objects/BaseDiscordChannel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: BaseDiscordChannel
description: DiscordLuau docs for BaseDiscordChannel.
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
[//]: # (to the discord-luau repository itself, we extract the comments from discord-luau and translate)
[//]: # (them into markdown files that Nextra can interpret!)

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

import LuaDeclaration from '$/components/LuaDeclaration.astro';
import LuaProperty from '$/components/LuaProperty.astro';

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

Represents a base discord channel, every discord channel object will extend from this as a base.

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

## Properties

The BaseDiscordChannel instance has no set properties!

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

## Methods

### deleteAsync

> <LuaDeclaration name="deleteAsync" className="BaseDiscordChannel" args={[ ]} returnType="Future" isMethod />
Deletes the channel asynchronously.

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

## Functions

The BaseDiscordChannel instance has no set functions!

77 changes: 77 additions & 0 deletions src/content/docs/classes/Objects/BaseDiscordGuildChannel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: BaseDiscordGuildChannel
description: DiscordLuau docs for BaseDiscordGuildChannel.
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
[//]: # (to the discord-luau repository itself, we extract the comments from discord-luau and translate)
[//]: # (them into markdown files that Nextra can interpret!)

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

import LuaDeclaration from '$/components/LuaDeclaration.astro';
import LuaProperty from '$/components/LuaProperty.astro';

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

Represents a base object for any/all guild channels.

=@inherit Objects.BaseDiscordChannel

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

## Properties

The BaseDiscordGuildChannel instance has no set properties!

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

## Methods

### overwriteRolePermissionsAsync

> <LuaDeclaration name="overwriteRolePermissionsAsync" className="BaseDiscordGuildChannel" args={[ { name: "roleId", type: "string" }, { name: "allowedPermissions", type: "PermissionsBuilder.PermissionsBuilder" }, { name: "disallowedPermissions", type: "PermissionsBuilder.PermissionsBuilder" } ]} returnType="Future" isMethod />
set overwrites for a specific role permissions for this channel in a discord guild.
### overwriteMemberPermissionssync

> <LuaDeclaration name="overwriteMemberPermissionssync" className="BaseDiscordGuildChannel" args={[ { name: "memberId", type: "string" }, { name: "allowedPermissions", type: "PermissionsBuilder.PermissionsBuilder" }, { name: "disallowedPermissions", type: "PermissionsBuilder.PermissionsBuilder" } ]} returnType="Future" isMethod />
set overwrites for a specific members permissions for this channel in a discord guild.
### overwriteMemberPermissionssync

> <LuaDeclaration name="overwriteMemberPermissionssync" className="BaseDiscordGuildChannel" args={[ { name: "roleIdOrUserId", type: "string" } ]} returnType="Future" isMethod />
deletes overwritten permissions for the given id, the given id must be either a role id or a user id
### getInvitesAsync

> <LuaDeclaration name="getInvitesAsync" className="BaseDiscordGuildChannel" args={[ ]} returnType="Future" isMethod />
Gets the invites for the channel asynchronously.
### createInviteAsync

> <LuaDeclaration name="createInviteAsync" className="BaseDiscordGuildChannel" args={[ { name: "maxAge", type: "number?" }, { name: "maxUses", type: "number?" }, { name: "temporary", type: "boolean?" } ]} returnType="Future" isMethod />
Creates an invite for the channel asynchronously.
### setPositionAsync

> <LuaDeclaration name="setPositionAsync" className="BaseDiscordGuildChannel" args={[ { name: "position", type: "number" }, { name: "parentId", type: "string?" }, { name: "syncPermissions", type: "boolean?" } ]} returnType="Future" isMethod />
Sets the position of the channel asynchronously.
### modifyAsync

> <LuaDeclaration name="modifyAsync" className="BaseDiscordGuildChannel" args={[ { name: "channelBuilder", type: "ChannelBuilder.ChannelBuilder" } ]} returnType="Future<unknown>" isMethod />
Modifies the thread channel settings asynchronously.
### getPublicArchivedThreadsAsync

> <LuaDeclaration name="getPublicArchivedThreadsAsync" className="BaseDiscordGuildChannel" args={[ { name: "epoch", type: "number?" }, { name: "limit", type: "number?" } ]} returnType="Future<{ number }>" isMethod />
Gets all archived public threads in the guild channel asynchronously.
### getPrivateArchivedThreadsAsync

> <LuaDeclaration name="getPrivateArchivedThreadsAsync" className="BaseDiscordGuildChannel" args={[ { name: "epoch", type: "number?" }, { name: "limit", type: "number?" } ]} returnType="Future<{ number }>" isMethod />
Gets all archived private threads in the guild channel asynchronously.
### getJoinedPrivateArchivedThreads

> <LuaDeclaration name="getJoinedPrivateArchivedThreads" className="BaseDiscordGuildChannel" args={[ { name: "epoch", type: "number?" }, { name: "limit", type: "number?" } ]} returnType="Future<{ number }>" isMethod />
Gets all archived private threads that the bot is a member of, in the guild channel asynchronously.

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

## Functions

The BaseDiscordGuildChannel instance has no set functions!

61 changes: 61 additions & 0 deletions src/content/docs/classes/Objects/BaseGuildTextChannel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: BaseGuildTextChannel
description: DiscordLuau docs for BaseGuildTextChannel.
---
[//]: # (This file was automatically compiled through the Generator luau code under this repository)
[//]: # (if you want to edit the documentation of discord-luau, please write changes)
[//]: # (to the discord-luau repository itself, we extract the comments from discord-luau and translate)
[//]: # (them into markdown files that Nextra can interpret!)

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

import LuaDeclaration from '$/components/LuaDeclaration.astro';
import LuaProperty from '$/components/LuaProperty.astro';

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

A base guild text channel, where any/all text channels extend from.

=@inherit Objects.BaseDiscordGuildChannel

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

## Properties

The BaseGuildTextChannel instance has no set properties!

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

## Methods

### triggerTypingIndicator

> <LuaDeclaration name="triggerTypingIndicator" className="BaseGuildTextChannel" args={[ ]} returnType="Future" isMethod />
Triggers the typing indicator in the channel.
### getMessagesAsync

> <LuaDeclaration name="getMessagesAsync" className="BaseGuildTextChannel" args={[ { name: "limit", type: "number?" } ]} returnType="Future" isMethod />
Gets messages from the channel asynchronously.
### getMessageAsync

> <LuaDeclaration name="getMessageAsync" className="BaseGuildTextChannel" args={[ { name: "messageId", type: "string" } ]} returnType="Future" isMethod />
Gets a specific message from the channel asynchronously.
### bulkDeleteMessagesAsync

> <LuaDeclaration name="bulkDeleteMessagesAsync" className="BaseGuildTextChannel" args={[ { name: "messageIds", type: "{string}" } ]} returnType="Future" isMethod />
Deletes multiple messages from the channel asynchronously.
### sendMessageAsync

> <LuaDeclaration name="sendMessageAsync" className="BaseGuildTextChannel" args={[ { name: "messageBuilder", type: "MessageBuilder" } ]} returnType="Future" isMethod />
Sends a message to the channel asynchronously.
### getPinnedMessagesAsync

> <LuaDeclaration name="getPinnedMessagesAsync" className="BaseGuildTextChannel" args={[ ]} returnType="Future<{[number]: DiscordMessage}>" isMethod />
Retrieves the pinned messages in the text channel asynchronously.

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

## Functions

The BaseGuildTextChannel instance has no set functions!

Loading

0 comments on commit 5ebbf63

Please sign in to comment.