Skip to content

Commit

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

### VerificationLevel

<LuaProperty name="GuildBuilder.VerificationLevel" type="table" />
---
An enumeration of filter levels.

- None: 0
- Low: 1
- Medium: 2
- High: 2
- VeryHigh: 2
### NotificationLevel

<LuaProperty name="GuildBuilder.NotificationLevel" type="table" />
---
An enumeration of filter levels.

- AllMessages: 0
- OnlyMentions: 1
### ExplicitContentFilterLevel

<LuaProperty name="GuildBuilder.ExplicitContentFilterLevel" type="table" />
---
An enumeration of filter levels.

- Disabled: 0
- MembersWithoutRoles: 1
- AllMembers: 2
### GuildFeature

<LuaProperty name="GuildBuilder.GuildFeature" type="table" />
---
An enumeration of guild features.

- AnimatedBanner: "ANIMATED_BANNER"
- AnimatedIcon: "ANIMATED_ICON"
- ApplicationCommandPermissionsV2: "APPLICATION_COMMAND_PERMISSIONS_V2"
- AutoModeration: "AUTO_MODERATION"
- Banner: "BANNER"
- Community: "COMMUNITY"
- CreatorMonetizableProvisional: "CREATOR_MONETIZABLE_PROVISIONAL"
- CreatorStorePage: "CREATOR_STORE_PAGE"
- DeveloperSupportServer: "DEVELOPER_SUPPORT_SERVER"
- Discoverable: "DISCOVERABLE"
- Featurable: "FEATURABLE"
- InvitesDisabled: "INVITES_DISABLED"
- InviteSplash: "INVITE_SPLASH"
- MemberVerificationGateEnabled: "MEMBER_VERIFICATION_GATE_ENABLED"
- MoreStickers: "MORE_STICKERS"
- News: "NEWS"
- Partnered: "PARTNERED"
- PreviewEnabled: "PREVIEW_ENABLED"
- RaidAlertsDisabled: "RAID_ALERTS_DISABLED"
- RoleIcons: "ROLE_ICONS"
- RoleSubscriptionsAvaliableForPurchase: "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE"
- RoleSubscriptionsEnabled: "ROLE_SUBSCRIPTIONS_ENABLED"
- TicketedEventsEnabled: "TICKETED_EVENTS_ENABLED"
- VanityUrl: "VANITY_URL"
- Verified: "VERIFIED"
- VipRegions: "VIP_REGIONS"
- WelcomeScreenEnabled: "WELCOME_SCREEN_ENABLED"

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

## Methods

### setName

> <LuaDeclaration name="setName" className="GuildBuilder" args={[ { name: "name", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the name of this discord guild.
### setVerificationLevel

> <LuaDeclaration name="setVerificationLevel" className="GuildBuilder" args={[ { name: "verificationLevel", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the verification level for this guild.
### setDefaultMessageNotificationLevel

> <LuaDeclaration name="setDefaultMessageNotificationLevel" className="GuildBuilder" args={[ { name: "notificationLevel", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the default message notification level for this guild.
### setExplicitContentFilterLevel

> <LuaDeclaration name="setExplicitContentFilterLevel" className="GuildBuilder" args={[ { name: "notificationLevel", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the explicit content filter level for this guild.
### setAfkChannelId

> <LuaDeclaration name="setAfkChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the discord Afk Voice Channel for this guild.
### setAfkTimeout

> <LuaDeclaration name="setAfkTimeout" className="GuildBuilder" args={[ { name: "timeout", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the timeout for members in discord voice channels. Valid inputs are:

- 60
- 300
- 900
- 1800
- 3600
### setIcon

> <LuaDeclaration name="setIcon" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the icon of this guild. imageData must be a base64, 1024x1024, encoded binary data for either a png/jpeg/gif
### setOwnerId

> <LuaDeclaration name="setOwnerId" className="GuildBuilder" args={[ { name: "ownerId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the owner of this guild.
### setSplash

> <LuaDeclaration name="setSplash" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the splash for this guild. imageData must be a 16:9, base64, encoded binary data for either a png/jpeg
### setDiscoverySplash

> <LuaDeclaration name="setDiscoverySplash" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the discovery splash for this guild. imageData must be a 16:9, base64, encoded binary data for either a png/jpeg
### setSysetBannerstemChannelId

> <LuaDeclaration name="setSysetBannerstemChannelId" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the banner for this guild. imageData must be a 16:9, base64, encoded binary data for either a png/jpeg
### setSystemChannelId

> <LuaDeclaration name="setSystemChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the System Channel for this guild.
### setSystemChannelFlags

> <LuaDeclaration name="setSystemChannelFlags" className="GuildBuilder" args={[ { name: "flags", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the flags for the System Channel in this guild.
### setRulesChannelId

> <LuaDeclaration name="setRulesChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the rules channel for this guild.
### setPublicUpdateChannelId

> <LuaDeclaration name="setPublicUpdateChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the public update channel for this guild
### setPreferredLocale

> <LuaDeclaration name="setPreferredLocale" className="GuildBuilder" args={[ { name: "locale", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the preferred locale of this guild
### addFeature

> <LuaDeclaration name="addFeature" className="GuildBuilder" args={[ { name: "feature", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Enables developers to specify features that are apart of this guild.
### setDescription

> <LuaDeclaration name="setDescription" className="GuildBuilder" args={[ { name: "description", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the description of this guild
### setPremiumProgressBarEnabled

> <LuaDeclaration name="setPremiumProgressBarEnabled" className="GuildBuilder" args={[ { name: "enabled", type: "boolean" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets if the Premium Progress bar is enabled
### setSafetyAlertsChannelId

> <LuaDeclaration name="setSafetyAlertsChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod />
Sets the Safety Alert channel id
### addRole

> <LuaDeclaration name="addRole" className="GuildBuilder" args={[ { name: "role", type: "Objects.GuildRoleBuilder" } ]} returnType="Objects.GuildBuilder" isMethod />
Enables developers to add a Role to a discord Guild channel upon creation.
### addChannel

> <LuaDeclaration name="addChannel" className="GuildBuilder" args={[ { name: "channel", type: "Objects.ChannelBuilder" } ]} returnType="Objects.GuildBuilder" isMethod />
Enables developers to add a Channel to a discord Guild channel upon creation.
### toPayloadObject

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

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

## Functions

### new

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

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

Allows a developer to build a Guild Role

```lua
local DiscordGuild = GuildRoleBuilder.new()
:setName("my-discord-role")
:setColor(0xFF0000)
:setHoisted(true)
:setMentionable(false)
```

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

## Properties

The GuildRoleBuilder instance has no set properties!

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

## Methods

### setName

> <LuaDeclaration name="setName" className="GuildRoleBuilder" args={[ { name: "name", type: "string" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Sets the name of the Role
### setColor

> <LuaDeclaration name="setColor" className="GuildRoleBuilder" args={[ { name: "color", type: "number" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Sets the color of the Role.
### setHoisted

> <LuaDeclaration name="setHoisted" className="GuildRoleBuilder" args={[ { name: "hoisted", type: "boolean" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Sets weather this role will split users in the roles hierarchy in the guild.
### setIcon

> <LuaDeclaration name="setIcon" className="GuildRoleBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Sets the Icon for this role, the imageData should be a base64 encoded, 128x128 jpg file.
### setUnicodeEmoji

> <LuaDeclaration name="setUnicodeEmoji" className="GuildRoleBuilder" args={[ { name: "unicodeEmoji", type: "string" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Sets the Emoji for this Role
### setPosition

> <LuaDeclaration name="setPosition" className="GuildRoleBuilder" args={[ { name: "position", type: "number" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Set the position of this Role, this will update the roles hierarchy in the guild.
### setMentionable

> <LuaDeclaration name="setMentionable" className="GuildRoleBuilder" args={[ { name: "mentionable", type: "boolean" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Set if discord members can mention this Role.
### setFlags

> <LuaDeclaration name="setFlags" className="GuildRoleBuilder" args={[ { name: "flags", type: "number" } ]} returnType="Objects.GuildRoleBuilder" isMethod />
Set the flags for the Guild
### toPayloadObject

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

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

## Functions

### new

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

0 comments on commit 01c8ef0

Please sign in to comment.