Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 22, 2024
1 parent 4df33f8 commit b60f97e
Show file tree
Hide file tree
Showing 84 changed files with 7,334 additions and 1 deletion.
2 changes: 1 addition & 1 deletion discord-luau
Submodule discord-luau updated 102 files
73 changes: 73 additions & 0 deletions src/content/docs/classes/Builders/ActivityBuilder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: ActivityBuilder
description: DiscordLuau docs for ActivityBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically @generated from moonwave comments using a script. Please do not exit by hand.)
[//]: # (To actually edit documentation, make changes to the main DiscordLuau repo.)

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

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

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

ActivityBuilder is used to construct an activity object for a Discord bot - including name, type, and streaming URL.

Usage:
```lua
local activity = ActivityBuilder.new()
:setActivityName("Playing a game")
:setActivityType(ActivityBuilder.Type.Game)
:setStreamingURL("https://twitch.tv/example")
```

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

## Properties

### Type

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

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

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

## Methods

### setActivityName

> <LuaDeclaration name="setActivityName" className="ActivityBuilder" args={[ { name: "activityName", type: "string" } ]} returnType="Builders.ActivityBuilder" isMethod />
Sets the name of the activity.
### setActivityType

> <LuaDeclaration name="setActivityType" className="ActivityBuilder" args={[ { name: "activityType", type: "number" } ]} returnType="Builders.ActivityBuilder" isMethod />
Sets the type of the activity.
### setStreamingURL

> <LuaDeclaration name="setStreamingURL" className="ActivityBuilder" args={[ { name: "streamURL", type: "string" } ]} returnType="Builders.ActivityBuilder" isMethod />
Sets the streaming URL of the activity. Only YouTube and Twitch URLs are allowed.
### toPayloadObject

> <LuaDeclaration name="toPayloadObject" className="ActivityBuilder" 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="ActivityBuilder" args={[ ]} />
Creates a new instance of ActivityBuilder.

60 changes: 60 additions & 0 deletions src/content/docs/classes/Builders/AttachmentBuilder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: AttachmentBuilder
description: DiscordLuau docs for AttachmentBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically @generated from moonwave comments using a script. Please do not exit by hand.)
[//]: # (To actually edit documentation, make changes to the main DiscordLuau repo.)

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

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

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

AttachmentBuilder allows you to build attachments that you can send files through to the discord API.

Usage:
```lua
local DiscordLuau = require("../Submodules/DiscordLuau")

local AttachmentBuilder = DiscordLuau.AttachmentBuilder.new()
:setName("Example.txt")
:setData("My Text Document!")
```

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

## Properties

The AttachmentBuilder instance has no set properties!

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

## Methods

### setName

> <LuaDeclaration name="setName" className="AttachmentBuilder" args={[ { name: "name", type: "string" } ]} returnType="Builders.AttachmentBuilder" isMethod />
Set the name for this Attachment
### setDescription

> <LuaDeclaration name="setDescription" className="AttachmentBuilder" args={[ { name: "description", type: "string" } ]} returnType="Builders.AttachmentBuilder" isMethod />
Set the description for this Attachment
### setData

> <LuaDeclaration name="setData" className="AttachmentBuilder" args={[ { name: "data", type: "string" } ]} returnType="Builders.AttachmentBuilder" isMethod />
Set the data for this Attachment

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

## Functions

### new

> <LuaDeclaration name="new" className="AttachmentBuilder" args={[ { name: "intentList", type: "{ string }" } ]} />
Creates a new instance of AttachmentBuilder with the specified intents.

120 changes: 120 additions & 0 deletions src/content/docs/classes/Builders/AutomoderationRuleBuilder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
title: AutomoderationRuleBuilder
description: DiscordLuau docs for AutomoderationRuleBuilder.
sidebar:
order: 2
collapsed: true
---
[//]: # (This file was automatically @generated from moonwave comments using a script. Please do not exit by hand.)
[//]: # (To actually edit documentation, make changes to the main DiscordLuau repo.)

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

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

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

AutomoderationRuleBuilder is used to construct an auto-moderation rule for a Discord guild, including trigger types, actions, and exempt roles or channels.

Usage:
```lua
local rule = AutomoderationRuleBuilder.new()
:setName("No Profanity")
:setEventType(AutomoderationRuleBuilder.EventType.MessageSend)
:setTriggerType(AutomoderationRuleBuilder.TriggerType.Keyword)
:setTriggerMetadata({ keywordFilter = {"badword1", "badword2"} })
:addAction(AutomoderationRuleBuilder.ActionType.BlockMessage, { customMessage = "Profanity is not allowed!" })
:setEnabled(true)
```

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

## Properties

### EventType

<LuaProperty name="AutomoderationRuleBuilder.EventType" type="table" />
---
An enumeration of event types.

- MessageSend: 1
### TriggerType

<LuaProperty name="AutomoderationRuleBuilder.TriggerType" type="table" />
---
An enumeration of trigger types.

- Keyword: 1
- Spam: 3
- KeywordPreset: 4
- MentionSpam: 5
### KeywordPresets

<LuaProperty name="AutomoderationRuleBuilder.KeywordPresets" type="table" />
---
An enumeration of keyword presets.

- Profanity: 1
- SexualContent: 2
- Slurs: 3
### ActionType

<LuaProperty name="AutomoderationRuleBuilder.ActionType" type="table" />
---
An enumeration of action types.

- BlockMessage: 1
- SendAlertMessage: 2
- Timeout: 3

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

## Methods

### setName

> <LuaDeclaration name="setName" className="AutomoderationRuleBuilder" args={[ { name: "name", type: "string" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Sets the name of the rule.
### setEventType

> <LuaDeclaration name="setEventType" className="AutomoderationRuleBuilder" args={[ { name: "eventType", type: "number" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Sets the event type for the rule.
### setTriggerType

> <LuaDeclaration name="setTriggerType" className="AutomoderationRuleBuilder" args={[ { name: "triggerType", type: "number" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Sets the trigger type for the rule.
### setTriggerMetadata

> <LuaDeclaration name="setTriggerMetadata" className="AutomoderationRuleBuilder" args={[ { name: "triggerMetadata", type: "table" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Sets the trigger metadata for the rule.
### addAction

> <LuaDeclaration name="addAction" className="AutomoderationRuleBuilder" args={[ { name: "actionType", type: "number" }, { name: "actionMetadata", type: "table" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Adds an action to the rule.
### setEnabled

> <LuaDeclaration name="setEnabled" className="AutomoderationRuleBuilder" args={[ { name: "enabled", type: "boolean" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Sets whether the rule is enabled.
### addExemptRole

> <LuaDeclaration name="addExemptRole" className="AutomoderationRuleBuilder" args={[ { name: "roleId", type: "string" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Adds an exempt role to the rule.
### addExemptChannel

> <LuaDeclaration name="addExemptChannel" className="AutomoderationRuleBuilder" args={[ { name: "channelId", type: "string" } ]} returnType="Builders.AutomoderationRuleBuilder" isMethod />
Adds an exempt channel to the rule.
### toPayloadObject

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

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

## Functions

### new

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

Loading

0 comments on commit b60f97e

Please sign in to comment.