|
| 1 | +--- |
| 2 | +title: GuildBuilder |
| 3 | +description: DiscordLuau docs for GuildBuilder. |
| 4 | +--- |
| 5 | +[//]: # (This file was automatically compiled through the Generator luau code under this repository) |
| 6 | +[//]: # (if you want to edit the documentation of discord-luau, please write changes) |
| 7 | +[//]: # (to the discord-luau repository itself, we extract the comments from discord-luau and translate) |
| 8 | +[//]: # (them into markdown files that Nextra can interpret!) |
| 9 | + |
| 10 | +[//]: # (----- DOCUMENT IMPORTS ----- ) |
| 11 | + |
| 12 | +import LuaDeclaration from '$/components/LuaDeclaration.astro'; |
| 13 | +import LuaProperty from '$/components/LuaProperty.astro'; |
| 14 | + |
| 15 | +[//]: # (----- DOCUMENT DESCRIPTION ----- ) |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +[//]: # (----- DOCUMENT PROPERTIES ----- ) |
| 20 | + |
| 21 | +## Properties |
| 22 | + |
| 23 | +### VerificationLevel |
| 24 | + |
| 25 | +<LuaProperty name="GuildBuilder.VerificationLevel" type="table" /> |
| 26 | +--- |
| 27 | +An enumeration of filter levels. |
| 28 | + |
| 29 | +- None: 0 |
| 30 | +- Low: 1 |
| 31 | +- Medium: 2 |
| 32 | +- High: 2 |
| 33 | +- VeryHigh: 2 |
| 34 | +### NotificationLevel |
| 35 | + |
| 36 | +<LuaProperty name="GuildBuilder.NotificationLevel" type="table" /> |
| 37 | +--- |
| 38 | +An enumeration of filter levels. |
| 39 | + |
| 40 | +- AllMessages: 0 |
| 41 | +- OnlyMentions: 1 |
| 42 | +### ExplicitContentFilterLevel |
| 43 | + |
| 44 | +<LuaProperty name="GuildBuilder.ExplicitContentFilterLevel" type="table" /> |
| 45 | +--- |
| 46 | +An enumeration of filter levels. |
| 47 | + |
| 48 | +- Disabled: 0 |
| 49 | +- MembersWithoutRoles: 1 |
| 50 | +- AllMembers: 2 |
| 51 | +### GuildFeature |
| 52 | + |
| 53 | +<LuaProperty name="GuildBuilder.GuildFeature" type="table" /> |
| 54 | +--- |
| 55 | +An enumeration of guild features. |
| 56 | + |
| 57 | +- AnimatedBanner: "ANIMATED_BANNER" |
| 58 | +- AnimatedIcon: "ANIMATED_ICON" |
| 59 | +- ApplicationCommandPermissionsV2: "APPLICATION_COMMAND_PERMISSIONS_V2" |
| 60 | +- AutoModeration: "AUTO_MODERATION" |
| 61 | +- Banner: "BANNER" |
| 62 | +- Community: "COMMUNITY" |
| 63 | +- CreatorMonetizableProvisional: "CREATOR_MONETIZABLE_PROVISIONAL" |
| 64 | +- CreatorStorePage: "CREATOR_STORE_PAGE" |
| 65 | +- DeveloperSupportServer: "DEVELOPER_SUPPORT_SERVER" |
| 66 | +- Discoverable: "DISCOVERABLE" |
| 67 | +- Featurable: "FEATURABLE" |
| 68 | +- InvitesDisabled: "INVITES_DISABLED" |
| 69 | +- InviteSplash: "INVITE_SPLASH" |
| 70 | +- MemberVerificationGateEnabled: "MEMBER_VERIFICATION_GATE_ENABLED" |
| 71 | +- MoreStickers: "MORE_STICKERS" |
| 72 | +- News: "NEWS" |
| 73 | +- Partnered: "PARTNERED" |
| 74 | +- PreviewEnabled: "PREVIEW_ENABLED" |
| 75 | +- RaidAlertsDisabled: "RAID_ALERTS_DISABLED" |
| 76 | +- RoleIcons: "ROLE_ICONS" |
| 77 | +- RoleSubscriptionsAvaliableForPurchase: "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE" |
| 78 | +- RoleSubscriptionsEnabled: "ROLE_SUBSCRIPTIONS_ENABLED" |
| 79 | +- TicketedEventsEnabled: "TICKETED_EVENTS_ENABLED" |
| 80 | +- VanityUrl: "VANITY_URL" |
| 81 | +- Verified: "VERIFIED" |
| 82 | +- VipRegions: "VIP_REGIONS" |
| 83 | +- WelcomeScreenEnabled: "WELCOME_SCREEN_ENABLED" |
| 84 | + |
| 85 | +[//]: # (----- DOCUMENT METHODS ----- ) |
| 86 | + |
| 87 | +## Methods |
| 88 | + |
| 89 | +### setName |
| 90 | + |
| 91 | +> <LuaDeclaration name="setName" className="GuildBuilder" args={[ { name: "name", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 92 | +Sets the name of this discord guild. |
| 93 | +### setVerificationLevel |
| 94 | + |
| 95 | +> <LuaDeclaration name="setVerificationLevel" className="GuildBuilder" args={[ { name: "verificationLevel", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 96 | +Sets the verification level for this guild. |
| 97 | +### setDefaultMessageNotificationLevel |
| 98 | + |
| 99 | +> <LuaDeclaration name="setDefaultMessageNotificationLevel" className="GuildBuilder" args={[ { name: "notificationLevel", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 100 | +Sets the default message notification level for this guild. |
| 101 | +### setExplicitContentFilterLevel |
| 102 | + |
| 103 | +> <LuaDeclaration name="setExplicitContentFilterLevel" className="GuildBuilder" args={[ { name: "notificationLevel", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 104 | +Sets the explicit content filter level for this guild. |
| 105 | +### setAfkChannelId |
| 106 | + |
| 107 | +> <LuaDeclaration name="setAfkChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 108 | +Sets the discord Afk Voice Channel for this guild. |
| 109 | +### setAfkTimeout |
| 110 | + |
| 111 | +> <LuaDeclaration name="setAfkTimeout" className="GuildBuilder" args={[ { name: "timeout", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 112 | +Sets the timeout for members in discord voice channels. Valid inputs are: |
| 113 | + |
| 114 | +- 60 |
| 115 | +- 300 |
| 116 | +- 900 |
| 117 | +- 1800 |
| 118 | +- 3600 |
| 119 | +### setIcon |
| 120 | + |
| 121 | +> <LuaDeclaration name="setIcon" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 122 | +Sets the icon of this guild. imageData must be a base64, 1024x1024, encoded binary data for either a png/jpeg/gif |
| 123 | +### setOwnerId |
| 124 | + |
| 125 | +> <LuaDeclaration name="setOwnerId" className="GuildBuilder" args={[ { name: "ownerId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 126 | +Sets the owner of this guild. |
| 127 | +### setSplash |
| 128 | + |
| 129 | +> <LuaDeclaration name="setSplash" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 130 | +Sets the splash for this guild. imageData must be a 16:9, base64, encoded binary data for either a png/jpeg |
| 131 | +### setDiscoverySplash |
| 132 | + |
| 133 | +> <LuaDeclaration name="setDiscoverySplash" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 134 | +Sets the discovery splash for this guild. imageData must be a 16:9, base64, encoded binary data for either a png/jpeg |
| 135 | +### setSysetBannerstemChannelId |
| 136 | + |
| 137 | +> <LuaDeclaration name="setSysetBannerstemChannelId" className="GuildBuilder" args={[ { name: "imageData", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 138 | +Sets the banner for this guild. imageData must be a 16:9, base64, encoded binary data for either a png/jpeg |
| 139 | +### setSystemChannelId |
| 140 | + |
| 141 | +> <LuaDeclaration name="setSystemChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 142 | +Sets the System Channel for this guild. |
| 143 | +### setSystemChannelFlags |
| 144 | + |
| 145 | +> <LuaDeclaration name="setSystemChannelFlags" className="GuildBuilder" args={[ { name: "flags", type: "number" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 146 | +Sets the flags for the System Channel in this guild. |
| 147 | +### setRulesChannelId |
| 148 | + |
| 149 | +> <LuaDeclaration name="setRulesChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 150 | +Sets the rules channel for this guild. |
| 151 | +### setPublicUpdateChannelId |
| 152 | + |
| 153 | +> <LuaDeclaration name="setPublicUpdateChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 154 | +Sets the public update channel for this guild |
| 155 | +### setPreferredLocale |
| 156 | + |
| 157 | +> <LuaDeclaration name="setPreferredLocale" className="GuildBuilder" args={[ { name: "locale", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 158 | +Sets the preferred locale of this guild |
| 159 | +### addFeature |
| 160 | + |
| 161 | +> <LuaDeclaration name="addFeature" className="GuildBuilder" args={[ { name: "feature", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 162 | +Enables developers to specify features that are apart of this guild. |
| 163 | +### setDescription |
| 164 | + |
| 165 | +> <LuaDeclaration name="setDescription" className="GuildBuilder" args={[ { name: "description", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 166 | +Sets the description of this guild |
| 167 | +### setPremiumProgressBarEnabled |
| 168 | + |
| 169 | +> <LuaDeclaration name="setPremiumProgressBarEnabled" className="GuildBuilder" args={[ { name: "enabled", type: "boolean" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 170 | +Sets if the Premium Progress bar is enabled |
| 171 | +### setSafetyAlertsChannelId |
| 172 | + |
| 173 | +> <LuaDeclaration name="setSafetyAlertsChannelId" className="GuildBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 174 | +Sets the Safety Alert channel id |
| 175 | +### addRole |
| 176 | + |
| 177 | +> <LuaDeclaration name="addRole" className="GuildBuilder" args={[ { name: "role", type: "Objects.GuildRoleBuilder" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 178 | +Enables developers to add a Role to a discord Guild channel upon creation. |
| 179 | +### addChannel |
| 180 | + |
| 181 | +> <LuaDeclaration name="addChannel" className="GuildBuilder" args={[ { name: "channel", type: "Objects.ChannelBuilder" } ]} returnType="Objects.GuildBuilder" isMethod /> |
| 182 | +Enables developers to add a Channel to a discord Guild channel upon creation. |
| 183 | +### toPayloadObject |
| 184 | + |
| 185 | +> <LuaDeclaration name="toPayloadObject" className="GuildBuilder" args={[ ]} returnType="Network.Resolvable" isMethod /> |
| 186 | +Converts the guild to a JSON object that can be sent to the Discord API. |
| 187 | + |
| 188 | +[//]: # (----- DOCUMENT FUNCTIONS ----- ) |
| 189 | + |
| 190 | +## Functions |
| 191 | + |
| 192 | +### new |
| 193 | + |
| 194 | +> <LuaDeclaration name="new" className="GuildBuilder" args={[ ]} /> |
| 195 | +Creates a new instance of GuildBuilder. |
| 196 | + |
0 commit comments