Skip to content

Commit

Permalink
docs: update refs for DiscordLuau/discord-luau@e89e4bf
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 8, 2024
1 parent 01c8ef0 commit 8689606
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 4 deletions.
76 changes: 76 additions & 0 deletions src/content/docs/classes/Builders/MemberBuilder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: MemberBuilder
description: DiscordLuau docs for MemberBuilder.
---
[//]: # (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 ----- )

MemberBuilder is used to update a member object for a guild,

Usage:
```lua
local member = MemberBuilder.new()
:setNickname("Discordian #0!")
```

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

## Properties

The MemberBuilder instance has no set properties!

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

## Methods

### setNickname

> <LuaDeclaration name="setNickname" className="MemberBuilder" args={[ { name: "nickname", type: "string" } ]} returnType="Builders.MemberBuilder" isMethod />
Sets the nickname of a discord member
### addRole

> <LuaDeclaration name="addRole" className="MemberBuilder" args={[ { name: "roleId", type: "string" } ]} returnType="Builders.MemberBuilder" isMethod />
Adds a role to a member
### setMuted

> <LuaDeclaration name="setMuted" className="MemberBuilder" args={[ { name: "muted", type: "boolean" } ]} returnType="Builders.MemberBuilder" isMethod />
Sets the muted state for this member
### setDeafened

> <LuaDeclaration name="setDeafened" className="MemberBuilder" args={[ { name: "deafened", type: "boolean" } ]} returnType="Builders.MemberBuilder" isMethod />
Sets the deafened state for this member
### setActiveVoiceChannel

> <LuaDeclaration name="setActiveVoiceChannel" className="MemberBuilder" args={[ { name: "voiceChannelId", type: "string" } ]} returnType="Builders.MemberBuilder" isMethod />
Allows you to specify the voice channel to move the member too.
### setTimeoutFor

> <LuaDeclaration name="setTimeoutFor" className="MemberBuilder" args={[ { name: "epoch", type: "number" } ]} returnType="Builders.MemberBuilder" isMethod />
Allows you to timeout a members communication.
### setFlags

> <LuaDeclaration name="setFlags" className="MemberBuilder" args={[ { name: "flags", type: "number" } ]} returnType="Builders.MemberBuilder" isMethod />
Sets the bitflags for this Member
### toPayloadObject

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

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

## Functions

### new

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

6 changes: 5 additions & 1 deletion src/content/docs/classes/DiscordClient.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,16 @@ end)
Fetches a guild by its ID.
### fetchChannelAsync

> <LuaDeclaration name="fetchChannelAsync" className="DiscordClient" args={[ { name: "channelId", type: "string" } ]} returnType="Future<DiscordChannel>" isMethod />
> <LuaDeclaration name="fetchChannelAsync" className="DiscordClient" args={[ { name: "channelId", type: "string" } ]} returnType="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 />
Updates the client's presence.
### createGuildAsync

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

> <LuaDeclaration name="setVerbose" className="DiscordClient" args={[ { name: "verbose", type: "boolean" } ]} isMethod />
Expand Down
22 changes: 21 additions & 1 deletion src/content/docs/classes/Objects/DiscordGuild.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ Sets multiple slash commands in the guild asynchronously.
Gets the audit logs of the guild asynchronously.
### modifyAsync

> <LuaDeclaration name="modifyAsync" className="DiscordGuild" args={[ { name: "guildSchema", type: "DiscordGuildSchema" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="modifyAsync" className="DiscordGuild" args={[ { name: "guildBuilder", type: "Builders.GuildBuilder" } ]} returnType="Future" isMethod />
Modifies the guild settings asynchronously.
### modifyCurrentMemberAsync

> <LuaDeclaration name="modifyCurrentMemberAsync" className="DiscordGuild" args={[ { name: "memberBuilder", type: "Builders.MemberBuilder" } ]} returnType="Future" isMethod />
Modifies the current member of the discord guild
### deleteAsync

> <LuaDeclaration name="deleteAsync" className="DiscordGuild" args={[ ]} returnType="Future" isMethod />
Expand Down Expand Up @@ -94,6 +98,22 @@ Gets a specific automoderation rule in the guild asynchronously.

> <LuaDeclaration name="createAutomoderationRuleAsync" className="DiscordGuild" args={[ { name: "getAutomoderationRuleBuilder", type: "AutomoderationRuleBuilder" } ]} returnType="Future" isMethod />
Creates an automoderation rule in the guild asynchronously.
### getPreviewAsync

> <LuaDeclaration name="getPreviewAsync" className="DiscordGuild" args={[ ]} returnType="Future<Objects.GuildPreview>" isMethod />
Get the preview of the current Guild
### createChannelAsync

> <LuaDeclaration name="createChannelAsync" className="DiscordGuild" args={[ { name: "channelBuilder", type: "Builders.ChannelBuilder" } ]} returnType="Future<Objects.DiscordChannel>" isMethod />
Creates a Guild Channel under a Guild.
### getActiveGuildThreads

> <LuaDeclaration name="getActiveGuildThreads" className="DiscordGuild" args={[ ]} returnType="Future<{ Objects.DiscordChannel }>" isMethod />
Fetches all active guild threads.
### addMemberAsync

> <LuaDeclaration name="addMemberAsync" className="DiscordGuild" args={[ { name: "userId", type: "string" }, { name: "accessToken", type: "string" } ]} returnType="Future<{ Objects.DiscordChannel }>" isMethod />
Adds a discordian to a guild.

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

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/classes/Objects/DiscordGuildMember.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Undeafens the guild member asynchronously.
Sets the nickname of the guild member asynchronously.
### modifyAsync

> <LuaDeclaration name="modifyAsync" className="DiscordGuildMember" args={[ { name: "modificationsTable", type: "table" } ]} returnType="Future" isMethod />
> <LuaDeclaration name="modifyAsync" className="DiscordGuildMember" args={[ { name: "memberBuilder", type: "Builders.MemberBuilder" } ]} returnType="Future" isMethod />
Modifies the guild member asynchronously.

[//]: # (----- DOCUMENT FUNCTIONS ----- )
Expand Down
43 changes: 43 additions & 0 deletions src/content/docs/classes/Objects/DiscordSticker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: DiscordSticker
description: DiscordLuau docs for DiscordSticker.
---
[//]: # (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 ----- )

The `DiscordSticker` class represents a Discord sticker and provides a structure for sticker data.

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

## Properties

### type

<LuaProperty name="DiscordSticker.type" type="string" />
---
The type of the DiscordSticker. Default is "DiscordSticker".

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

## Methods

The DiscordSticker instance has no set methods!

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

## Functions

### new

> <LuaDeclaration name="new" className="DiscordSticker" args={[ { name: "discordClient", type: "any" }, { name: "emojiData", type: "table" } ]} />
Creates a new DiscordSticker instance.

39 changes: 39 additions & 0 deletions src/content/docs/classes/Objects/GuildPreview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: GuildPreview
description: DiscordLuau docs for GuildPreview.
---
[//]: # (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 ----- )

GuildPreview represents a user on Discord, encapsulating user data such as username, avatar, and various flags.

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

## Properties

The GuildPreview instance has no set properties!

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

## Methods

The GuildPreview instance has no set methods!

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

## Functions

### new

> <LuaDeclaration name="new" className="GuildPreview" args={[ { name: "discordClient", type: "any" }, { name: "guildPreview", type: "{ ... }" } ]} />
Creates a new instance of GuildPreview.

0 comments on commit 8689606

Please sign in to comment.