# featherfall/quill_core

v0.1.0-alpha.2 Â· published ...

A featherweight framework for Luau

Target

Roblox

# Core

The core crate of Quill.

## Defining singletons

A singleton is defined to be a table of any shape and type, with optionally an init and start method.

    export type Singleton = {
        init: ((Singleton) -> ())?,
        start: ((Singleton) -> ())?,
        [any]: any,

Init is executed after all modules are loaded and **cannot yield**.
Start is executed after all modules are initialized and can yield, as it's ran in another thread with `task.spawn`.

    local MySingleton = {}

    function MySingleton.init(self: self)
        -- Initialize your properties and everything that other singletons may depend on here.
        -- For example, you'd initialize your datastore wrapper or signals in this function.
    end

    function MySingleton.start(self: self)
        -- Run your singletons' logic here.
        -- For example, you'd put a game loop here.
    end

    -- Allows for easy typechecking of any properties and methods.
    export type self = typeof(MySingleton)
    return MySingleton

## Defining modules

Modules are Quill extensions which can hook onto:

  * Singleton lifecycles:
    * `injected` \- called once a singleton has been injected by the user with `Quill:with_singleton` or `Quill:with_singletons`
    * `loaded` \- called once a singleton's modulescript has been loaded by the module loader; injected modules are skipped by this, as the user passes a loaded singleton to the framework in place of a module
    * `initialized` \- called once a singleton has been initialized; immediately if it doesn't have an `:init ` method, or if it has one, after it was called
    * `started` \- called once a singleton has been started; immediately if it doesn't have a `:start` method, or if it has one, after it was called
  * Module loader phases:
    * `pre_loading` \- called before any modules are loaded; injected modules are loaded prior to this, as the user passes a loaded singleton to the framework in place of a module
    * `post_loading` \- called after all modules were loaded
    * `pre_initialization` \- called before singletons are initialized
    * `post_initialization` \- called after singletons are initialized
    * `pre_starting` \- called before singletons are started
    * `post_starting` \- called after singletons are started

Lifecycle hooks are called with a singleton and its current lifecycle:

    type LifecycleHook = (lifecycle: Lifecycle, singleton: Singleton) -> ()

Phases are called with a list of all singletons currently attached to the framework and the current module loader phase:

    type PhaseHook = (phase: Phase, singletons: { Singleton }) -> ()

## Building and starting the framework

After creating quill with `Quill.new`, you may:

  * Add Quill modules with `Quill:with_mod`
  * Add modulescripts with `Quill:with_module` and `Quill:with_modules`
  * Inject singletons with `Quill:with_singleton` and `Quill:with_singletons`
  * Lastly, start Quill with `Quill:write`

Ideally, you'd add Quill modules prior to anything else, as injecting singletons runs the injected lifecycle hooks for them.

For example:

    local quill = require("@pkg/quill")
    local rblx_lifecycles = require("@pkg/quill_rblx_lifecycles")

    quill.new()
        :with_mod(rblx_lifecycles.mod)
        :with_modules(script.singletons:GetChildren())
        :write()


### Own your Codebase

Quill is extremely flexible, and divides its functionality between optional **crates**, allowing you to own your codebase.

### Script with Power

Quill provides many different approaches to handling bootstrapping, error logging, and much more, resulting in a more **powerful** approach to coding.

### Enhance your Productivity

Quill is great for enhancing your productivity and changing the ways in which you approach bootstrapping your projects.


# featherfall/quill_core

v0.1.0-alpha.2 Â· published ...

A featherweight framework for Luau

Target

Roblox

This package doesn't have any dependencies.


# featherfall/quill_core

v0.1.0-alpha.2 Â· published ...

A featherweight framework for Luau

Target

Roblox

## [0.1.0-alpha.2 (latest)](https://pesde.dev/packages/featherfall/quill_core/0.1.0-alpha.2/any)

... Â·  Roblox, Luau

## [0.1.0-alpha.1 ](https://pesde.dev/packages/featherfall/quill_core/0.1.0-alpha.1/any)

... Â·  Roblox, Luau

## [0.1.0-alpha.0 ](https://pesde.dev/packages/featherfall/quill_core/0.1.0-alpha.0/any)

... Â·  Roblox, Luau


# featherfall/quill_core

v0.1.0-alpha.1 Â· published ...

A featherweight framework for Luau

Target

Roblox

# Core

The core crate of Quill.

## Defining singletons

A singleton is defined to be a table of any shape and type, with optionally an init and start method.

    export type Singleton = {
        init: ((Singleton) -> ())?,
        start: ((Singleton) -> ())?,
        [any]: any,

Init is executed after all modules are loaded and **cannot yield**.
Start is executed after all modules are initialized and can yield, as it's ran in another thread with `task.spawn`.

    local MySingleton = {}

    function MySingleton.init(self: self)
        -- Initialize your properties and everything that other singletons may depend on here.
        -- For example, you'd initialize your datastore wrapper or signals in this function.
    end

    function MySingleton.start(self: self)
        -- Run your singletons' logic here.
        -- For example, you'd put a game loop here.
    end

    -- Allows for easy typechecking of any properties and methods.
    export type self = typeof(MySingleton)
    return MySingleton

## Defining modules

Modules are Quill extensions which can hook onto:

  * Singleton lifecycles:
    * `injected` \- called once a singleton has been injected by the user with `Quill:with_singleton` or `Quill:with_singletons`
    * `loaded` \- called once a singleton's modulescript has been loaded by the module loader; injected modules are skipped by this, as the user passes a loaded singleton to the framework in place of a module
    * `initialized` \- called once a singleton has been initialized; immediately if it doesn't have an `:init ` method, or if it has one, after it was called
    * `started` \- called once a singleton has been started; immediately if it doesn't have a `:start` method, or if it has one, after it was called
  * Module loader phases:
    * `pre_loading` \- called before any modules are loaded; injected modules are loaded prior to this, as the user passes a loaded singleton to the framework in place of a module
    * `post_loading` \- called after all modules were loaded
    * `pre_initialization` \- called before singletons are initialized
    * `post_initialization` \- called after singletons are initialized
    * `pre_starting` \- called before singletons are started
    * `post_starting` \- called after singletons are started

Lifecycle hooks are called with a singleton and its current lifecycle:

    type LifecycleHook = (lifecycle: Lifecycle, singleton: Singleton) -> ()

Phases are called with a list of all singletons currently attached to the framework and the current module loader phase:

    type PhaseHook = (phase: Phase, singletons: { Singleton }) -> ()

## Building and starting the framework

After creating quill with `Quill.new`, you may:

  * Add Quill modules with `Quill:with_mod`
  * Add modulescripts with `Quill:with_module` and `Quill:with_modules`
  * Inject singletons with `Quill:with_singleton` and `Quill:with_singletons`
  * Lastly, start Quill with `Quill:write`

Ideally, you'd add Quill modules prior to anything else, as injecting singletons runs the injected lifecycle hooks for them.

For example:

    local quill = require("@pkg/quill")
    local rblx_lifecycles = require("@pkg/quill_rblx_lifecycles")

    quill.new()
        :with_mod(rblx_lifecycles.mod)
        :with_modules(script.singletons:GetChildren())
        :write()


# featherfall/quill_core

v0.1.0-alpha.0 Â· published ...

A featherweight framework for Luau

Target

Roblox

# Core

The core crate of Quill.

## Defining singletons

A singleton is defined to be a table of any shape and type, with optionally an init and start method.

    export type Singleton = {
        init: ((Singleton) -> ())?,
        start: ((Singleton) -> ())?,
        [any]: any,

Init is executed after all modules are loaded and **cannot yield**.
Start is executed after all modules are initialized and can yield, as it's ran in another thread with `task.spawn`.

    local MySingleton = {}

    function MySingleton.init(self: self)
        -- Initialize your properties and everything that other singletons may depend on here.
        -- For example, you'd initialize your datastore wrapper or signals in this function.
    end

    function MySingleton.start(self: self)
        -- Run your singletons' logic here.
        -- For example, you'd put a game loop here.
    end

    -- Allows for easy typechecking of any properties and methods.
    export type self = typeof(MySingleton)
    return MySingleton

## Defining modules

Modules are Quill extensions which can hook onto:

  * Singleton lifecycles:
    * `injected` \- called once a singleton has been injected by the user with `Quill:with_singleton` or `Quill:with_singletons`
    * `loaded` \- called once a singleton's modulescript has been loaded by the module loader; injected modules are skipped by this, as the user passes a loaded singleton to the framework in place of a module
    * `initialized` \- called once a singleton has been initialized; immediately if it doesn't have an `:init ` method, or if it has one, after it was called
    * `started` \- called once a singleton has been started; immediately if it doesn't have a `:start` method, or if it has one, after it was called
  * Module loader phases:
    * `pre_loading` \- called before any modules are loaded; injected modules are loaded prior to this, as the user passes a loaded singleton to the framework in place of a module
    * `post_loading` \- called after all modules were loaded
    * `pre_initialization` \- called before singletons are initialized
    * `post_initialization` \- called after singletons are initialized
    * `pre_starting` \- called before singletons are started
    * `post_starting` \- called after singletons are started

Lifecycle hooks are called with a singleton and its current lifecycle:

    type LifecycleHook = (lifecycle: Lifecycle, singleton: Singleton) -> ()

Phases are called with a list of all singletons currently attached to the framework and the current module loader phase:

    type PhaseHook = (phase: Phase, singletons: { Singleton }) -> ()

## Building and starting the framework

After creating quill with `Quill.new`, you may:

  * Add Quill modules with `Quill:with_mod`
  * Add modulescripts with `Quill:with_module` and `Quill:with_modules`
  * Inject singletons with `Quill:with_singleton` and `Quill:with_singletons`
  * Lastly, start Quill with `Quill:write`

Ideally, you'd add Quill modules prior to anything else, as injecting singletons runs the injected lifecycle hooks for them.

For example:

    local quill = require("@pkg/quill")
    local rblx_lifecycles = require("@pkg/quill_rblx_lifecycles")

    quill.new()
        :with_mod(rblx_lifecycles.mod)
        :with_modules(script.singletons:GetChildren())
        :write()


# codjo3/run_in_roblox

v0.3.0 Â· published ...

Luau port of the run-in-roblox Rojo tool.

Target

Lune

# run-in-roblox (Luau)

A Luau port of [rojo-rbx/run-in-roblox](https://github.com/rojo-rbx/run-in-roblox), built for [Lune](https://lune-org.github.io) and distributed via [pesde](https://pesde.dev).

run-in-roblox opens a place file in Roblox Studio, runs a script inside it, and pipes all output back to your terminal â enabling traditional automation tools to work alongside Roblox.

## Installation

### With pesde

    pesde add codjo3/run_in_roblox

## Requirements

  * [pesde](https://pesde.dev) with Lune support
  * Roblox Studio installed on your machine

### Platform support

OS| Supported| Notes
---|---|---
Windows| â | Native Studio install
macOS| â | Native Studio install
Linux| â ï¸| Via [Vinegar](https://github.com/vinegarhq/vinegar), [Grapejuice](https://gitlab.com/brinkervii/grapejuice), or [Sober](https://sober.vinegarhq.org)

## Usage

    pesde x codjo3/run_in_roblox -- --place MyPlace.rbxlx --script my-script.luau

This opens `MyPlace.rbxlx` in Roblox Studio, runs `my-script.luau` until it completes, then exits.

`--script` and `--place` are both required.

### Output

Output from inside Studio is forwarded to your terminal with color coding:

Level| Colour
`print`| White
`info`| Cyan
`warn`| Yellow
`error`| Red

Any `error`-level message sets the exit code to `1`, making it straightforward to use run-in-roblox in CI pipelines.

## How it works

  1. Your place file is copied to a temp directory to prevent Studio `.lock` file conflicts
  2. A `.rbxmx` plugin file is written to Studio's plugins folder containing:
     * A `Script` that connects to `LogService`, contacts the local server, and manages the run lifecycle
     * A `ModuleScript` child (`Main`) containing your script wrapped in a function
  3. A local HTTP server starts on port `50312`
  4. Roblox Studio is launched with the temp place file
  5. The plugin verifies it's connected to the correct server via a unique session ID, then runs your script and streams output back as JSON over HTTP
  6. Once your script finishes, Studio is killed and all temp files (including the `.lock` file) are cleaned up

## Differences from the original

This port is functionally equivalent to the original Rust tool with a few notes:

  * **Distributed via pesde** instead of GitHub Releases, Foreman, or crates.io
  * **Linux support** added for Vinegar, Grapejuice, and Sober compatibility layers
  * **No binary place support** â `.rbxl`/`.rbxlx` place files are supported; binary `.rbxl` format is not currently handled differently (Studio opens both fine)
  * The plugin template is embedded directly in the source rather than as a separate file

## License

run-in-roblox (Luau) is available under the MIT License. See [LICENSE.txt](https://pesde.dev/packages/codjo3/run_in_roblox/0.3.0/LICENSE.txt) for details.

Original tool by [Lucien Greathouse](https://github.com/lpghatguy) and the [Rojo contributors](https://github.com/rojo-rbx/run-in-roblox/graphs/contributors).


# magic/starknet_luau

v0.2.0 Â· published ...

Pure Luau SDK for Starknet blockchain interaction from Roblox games

Target

Roblox

# starknet-luau

[](https://github.com/b-j-roberts/starknet-luau/actions/workflows/ci.yml) [](https://github.com/b-j-roberts/starknet-luau/releases) [](https://pesde.dev/packages/magic/starknet_luau/0.2.0/LICENSE)

Pure Luau SDK for interacting with the Starknet blockchain from Roblox games. Provides cryptographic primitives, account management, transaction building/signing, contract interaction, paymaster-sponsored transactions, and RPC connectivity -- all implemented in Luau with no external native dependencies.

## Features

  * Player onboarding lifecycle management
  * Encrypted key storage via DataStore
  * SNIP-29 paymaster integration (AVNU, policy engine, per-player budgets)
  * Deploy account orchestration with batch deploy for game onboarding
  * Request queuing with priority batching and response caching
  * Event polling with DataStore persistence
  * V3 INVOKE and DEPLOY_ACCOUNT transaction building and signing
  * ERC-20 and ERC-721 presets
  * ABI-driven contract interaction with recursive Cairo type codec
  * Full Stark-curve cryptography (BigInt, ECDSA, Poseidon, Pedersen, Keccak, SHA-256)
  * SNIP-9 outside execution (meta-transactions)
  * SNIP-12 typed data signing (LEGACY Pedersen + ACTIVE Poseidon)
  * Typed error hierarchy with numeric error codes

## Installation

**Via Pesde:**

    [dependencies]
    starknet_luau = { name = "magic/starknet_luau", version = "^0.2.0" }

> **Note:** Pesde installs packages to `roblox_packages/` by default. Your require path will be:
>     local Starknet = require(game.ReplicatedStorage.roblox_packages.StarknetLuau)

**Via Wally:**

    [dependencies]
    starknet-luau = "b-j-roberts/[[email protected]](https://pesde.dev/cdn-cgi/l/email-protection)"

**Manual (.rbxm):** Download the latest `.rbxm` from [Releases](https://pesde.dev/packages/magic/releases) and drop it into your project.

## Quick Start

    local Starknet = require(game.ReplicatedStorage.Packages.StarknetLuau)

    -- Create a provider
    local provider = Starknet.provider.RpcProvider.new("https://api.zan.top/public/starknet-sepolia")

    -- Get the latest block number
    provider:getBlockNumber():andThen(function(blockNumber)
        print("Current block:", blockNumber)
    end)

    -- Read from a contract
    local contract = Starknet.contract.Contract.new(provider, contractAddress, abi)
    contract:call("balanceOf", { accountAddress }):andThen(function(balance)
        print("Balance:", balance)
    end)

## Documentation

Guide| Description
[Getting Started](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/getting-started.md)| Installation, basic setup, first transaction
[Contract Interaction](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/contracts.md)| Reading state, writing transactions, multicall, presets
[Account Management](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/accounts.md)| Key generation, address derivation, account types, nonce handling
[Common Patterns](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/patterns.md)| NFT gating, token rewards, onchain leaderboards
[Roblox Considerations](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/roblox.md)| Rate limits, server-side patterns, security best practices
[Crypto Deep Dive](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/crypto.md)| Understanding BigInt, StarkField, curves, hashes, ECDSA
[API Reference](https://pesde.dev/packages/magic/starknet_luau/0.2.0/docs/guides/api-reference.md)| Complete API documentation for all modules

## Examples

Example| Description
[read-contract.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/read-contract.luau)| Read ERC-20 token balances from Starknet
[send-transaction.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/send-transaction.luau)| Send an INVOKE transaction
[deploy-account.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/deploy-account.luau)| Deploy a new Starknet account
[player-onboarding.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/player-onboarding.luau)| Full player lifecycle with KeyStore + OnboardingManager
[sponsored-transaction.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/sponsored-transaction.luau)| Gasless transactions via paymaster
[multicall.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/multicall.luau)| Batch multiple calls in a single transaction
[nft-gate.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/nft-gate.luau)| Gate game content behind NFT ownership
[leaderboard.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/leaderboard.luau)| Onchain leaderboard integration
[typed-data.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/typed-data.luau)| SNIP-12 typed data signing
[outside-execution.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/outside-execution.luau)| SNIP-9 meta-transactions
[event-listener.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/event-listener.luau)| Poll and process onchain events
[provider-features.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/provider-features.luau)| Request queuing, caching, rate limiting
[error-handling.luau](https://pesde.dev/packages/magic/starknet_luau/0.2.0/examples/error-handling.luau)| Typed error handling patterns

## API Overview

Module| Description
`wallet`| Account (OZ/Argent/Braavos), AccountType, AccountFactory, TypedData (SNIP-12), OutsideExecution (SNIP-9), KeyStore, OnboardingManager
`contract`| Contract (ABI-driven), AbiCodec (recursive Cairo codec), ERC20, ERC721, PresetFactory
`paymaster`| PaymasterRpc (SNIP-29), AvnuPaymaster, PaymasterPolicy, PaymasterBudget, SponsoredExecutor
`provider`| RpcProvider (22+ RPC methods), JsonRpcClient, EventPoller, RequestQueue, ResponseCache, NonceManager
`tx`| TransactionBuilder, TransactionHash (V3 INVOKE + DEPLOY_ACCOUNT), CallData encoding
`crypto`| BigInt, StarkField, StarkScalarField, StarkCurve, Poseidon, Pedersen, Keccak, SHA256, ECDSA, FieldFactory
`signer`| StarkSigner with RFC 6979 deterministic signing
`errors`| StarknetError (typed hierarchy), ErrorCodes (numeric constants)
`shared`| interfaces, HexUtils, BufferUtils, ByteArray, TestableDefaults (internal)

## Project Structure

    starknet-luau/
    âââ src/
    â   âââ init.luau               # Main entry point / barrel exports (9 namespaces)
    â   âââ constants.luau          # Chain IDs, class hashes, token addresses, SDK version
    â   âââ crypto/                 # Cryptographic primitives (BigInt, fields, curves, hashes, ECDSA)
    â   âââ signer/                 # Stark ECDSA signing (RFC 6979)
    â   âââ provider/               # RPC client, event polling, queue, cache, nonce manager
    â   âââ tx/                     # Transaction building, hashing, calldata encoding
    â   âââ wallet/                 # Account management, key store, onboarding, SNIP-9/12
    â   âââ contract/               # ABI-driven contract interface, codec, ERC presets
    â   âââ paymaster/              # SNIP-29 paymaster, AVNU, policy, budget, sponsored executor
    â   âââ errors/                 # Typed error hierarchy and numeric error codes
    â   âââ shared/                 # Internal utilities (interfaces, hex, buffer, byte array)
    âââ tests/                      # Lune test specs (50 spec files, 2,846 tests)
    âââ examples/                   # Runnable example scripts (13 examples)
    âââ docs/                       # SPEC.md, ROADMAP.md, and guides
    âââ .github/workflows/          # CI + Release automation
    âââ default.project.json        # Rojo project (library)
    âââ dev.project.json            # Rojo project (development)
    âââ rokit.toml                  # Toolchain versions
    âââ wally.toml                  # Package manifest (Wally)
    âââ pesde.toml                  # Package manifest (Pesde)
    âââ Makefile                    # Build commands

## Development

### Prerequisites

  * [Rokit](https://github.com/rojo-rbx/rokit) v0.6+ (toolchain manager â installs Rojo, Wally, Lune, Selene, StyLua)
  * [Pesde](https://pesde.dev) (optional, if using Pesde for dependencies)

### Setup

    rokit install       # Install rojo, wally, lune, selene, stylua
    make install        # Install Wally packages + generate types
    rojo serve          # Start live sync to Roblox Studio

### Commands

    make install        # Install deps via Wally, generate sourcemap + package types
    make pesde-install  # Install deps via Pesde
    make serve          # Start Rojo live sync
    make build          # Build .rbxm model file
    make test           # Run tests with Lune
    make lint           # Lint with Selene
    make fmt            # Format with StyLua
    make check          # Run lint + fmt check + test

## Contributing

  1. Fork the repo
  2. Run `rokit install` to set up the toolchain
  3. Run `make install` to install dependencies
  4. Run `make check` before submitting a PR

## License

[MIT](https://pesde.dev/packages/magic/starknet_luau/0.2.0/LICENSE)


# featherfall/quill_core

v0.1.0-alpha.1 Â· published ...

A featherweight framework for Luau

Target

Roblox

This package doesn't have any dependencies.


# featherfall/quill_core

v0.1.0-alpha.0 Â· published ...

A featherweight framework for Luau

Target

Roblox

This package doesn't have any dependencies.


# pesde/argon

v2.0.28 Â· published ...

Argon - Full featured tool for Roblox development

Target

Lune

## Dependencies

### [lukadev_0/option ](https://pesde.dev/packages/lukadev_0/option/latest/lune)

^1.2.1 Â· lune

### [lukadev_0/result ](https://pesde.dev/packages/lukadev_0/result/latest/lune)

^1.2.1 Â· lune

### [pesde/toolchainlib ](https://pesde.dev/packages/pesde/toolchainlib/latest/lune)

^0.2.2 Â· lune


# pesde/argon

v2.0.28 Â· published ...

Argon - Full featured tool for Roblox development

Target

Lune

## [2.0.28 (latest)](https://pesde.dev/packages/pesde/argon/2.0.28/any)

... Â·  Lune

## [2.0.27 ](https://pesde.dev/packages/pesde/argon/2.0.27/any)

... Â·  Lune

## [2.0.26+toolchainlib.1 ](https://pesde.dev/packages/pesde/argon/2.0.26%2Btoolchainlib.1/any)

... Â·  Lune

## [2.0.26 ](https://pesde.dev/packages/pesde/argon/2.0.26/any)

... Â·  Lune

## [2.0.25 ](https://pesde.dev/packages/pesde/argon/2.0.25/any)

... Â·  Lune

## [2.0.24 ](https://pesde.dev/packages/pesde/argon/2.0.24/any)

... Â·  Lune

## [2.0.23 ](https://pesde.dev/packages/pesde/argon/2.0.23/any)

... Â·  Lune

## [2.0.22 ](https://pesde.dev/packages/pesde/argon/2.0.22/any)

... Â·  Lune

## [2.0.21 ](https://pesde.dev/packages/pesde/argon/2.0.21/any)

... Â·  Lune


# ophidiedev/minstance

v0.8.0 Â· published ...

A very fast Instance serializer for Roblox that can serialize 40,000 Instances and compress it into a 100K+ character string in only 0.4s

Target

Roblox

## [0.8.0 (latest)](https://pesde.dev/packages/ophidiedev/minstance/0.8.0/any)

... Â·  Roblox

## [0.6.0 ](https://pesde.dev/packages/ophidiedev/minstance/0.6.0/any)

... Â·  Roblox

## [0.5.0 ](https://pesde.dev/packages/ophidiedev/minstance/0.5.0/any)

... Â·  Roblox

## [0.4.0 ](https://pesde.dev/packages/ophidiedev/minstance/0.4.0/any)

... Â·  Roblox

## [0.3.0 ](https://pesde.dev/packages/ophidiedev/minstance/0.3.0/any)

... Â·  Roblox

## [0.2.0 ](https://pesde.dev/packages/ophidiedev/minstance/0.2.0/any)

... Â·  Roblox

## [0.1.0 ](https://pesde.dev/packages/ophidiedev/minstance/0.1.0/any)

... Â·  Roblox


# ophidiedev/minstance

v0.8.0 Â· published ...

A very fast Instance serializer for Roblox that can serialize 40,000 Instances and compress it into a 100K+ character string in only 0.4s

Target

Roblox

## Dev Dependencies

### [pesde/rojo ](https://pesde.dev/packages/pesde/rojo/latest/lune)

^7.4.4 Â· lune

### [pesde/scripts_rojo ](https://pesde.dev/packages/pesde/scripts_rojo/latest/lune)

^0.1.0 Â· lune


# acecateer/lune_redis

v0.1.0 Â· published ...

Lune interface for Redis

Target

Lune

## [0.1.0 (latest)](https://pesde.dev/packages/acecateer/lune_redis/0.1.0/any)

... Â·  Lune


# acecateer/lune_redis

v0.1.0 Â· published ...

Lune interface for Redis

Target

Lune

This package doesn't have any dependencies.


# isoopod/pack

v0.11.0 Â· published ...

Schematized Luau buffer serialization library.

Target

Roblox

## [0.11.0 (latest)](https://pesde.dev/packages/isoopod/pack/0.11.0/any)

... Â·  Roblox

## [0.10.1 ](https://pesde.dev/packages/isoopod/pack/0.10.1/any)

... Â·  Roblox


# isoopod/pack

v0.11.0 Â· published ...

Schematized Luau buffer serialization library.

Target

Roblox

## Dev Dependencies

### [jsdotlua/jest (wally)](https://wally.run/package/jsdotlua/jest)

^3.10.0

### [jsdotlua/jest-globals (wally)](https://wally.run/package/jsdotlua/jest-globals)

^3.10.0

### [pesde/rojo ](https://pesde.dev/packages/pesde/rojo/latest/lune)

^7.5.1 Â· lune

### [pesde/scripts_rojo ](https://pesde.dev/packages/pesde/scripts_rojo/latest/lune)

^0.2.0 Â· lune


# josephh310/vide_typed

v0.4.4 Â· published ...

Vide with types, fixed for the new luau version

Target

Roblox

This package doesn't have any dependencies.


# josephh310/vide_typed

v0.4.4 Â· published ...

Vide with types, fixed for the new luau version

Target

Roblox

## [0.4.4 (latest)](https://pesde.dev/packages/josephh310/vide_typed/0.4.4/any)

... Â·  Roblox

## [0.4.3 ](https://pesde.dev/packages/josephh310/vide_typed/0.4.3/any)

... Â·  Roblox


# pepeeltoro41/pepecs

v0.0.8 Â· published ...

Pepecs: an ecs

Target

Luau

## [0.0.8 (latest)](https://pesde.dev/packages/pepeeltoro41/pepecs/0.0.8/any)

... Â·  Luau

## [0.0.7 ](https://pesde.dev/packages/pepeeltoro41/pepecs/0.0.7/any)

... Â·  Luau

## [0.0.4 ](https://pesde.dev/packages/pepeeltoro41/pepecs/0.0.4/any)

... Â·  Luau

## [0.0.3 ](https://pesde.dev/packages/pepeeltoro41/pepecs/0.0.3/any)

... Â·  Luau

## [0.0.2 ](https://pesde.dev/packages/pepeeltoro41/pepecs/0.0.2/any)

... Â·  Luau


# pepeeltoro41/pepecs

v0.0.8 Â· published ...

Pepecs: an ecs

Target

Luau

This package doesn't have any dependencies.


# pesde/selene

v0.30.1 Â· published ...

A blazing-fast modern Lua linter written in Rust

Target

Lune

## Dependencies

### [lukadev_0/option ](https://pesde.dev/packages/lukadev_0/option/latest/lune)

^1.2.1 Â· lune

### [lukadev_0/result ](https://pesde.dev/packages/lukadev_0/result/latest/lune)

^1.2.1 Â· lune

### [pesde/toolchainlib ](https://pesde.dev/packages/pesde/toolchainlib/latest/lune)

^0.2.2 Â· lune


# pesde/selene

v0.30.1 Â· published ...

A blazing-fast modern Lua linter written in Rust

Target

Lune

## [0.30.1 (latest)](https://pesde.dev/packages/pesde/selene/0.30.1/any)

... Â·  Lune

## [0.30.0 ](https://pesde.dev/packages/pesde/selene/0.30.0/any)

... Â·  Lune

## [0.29.0+toolchainlib.1 ](https://pesde.dev/packages/pesde/selene/0.29.0%2Btoolchainlib.1/any)

... Â·  Lune

## [0.29.0 ](https://pesde.dev/packages/pesde/selene/0.29.0/any)

... Â·  Lune

## [0.28.0 ](https://pesde.dev/packages/pesde/selene/0.28.0/any)

... Â·  Lune

## [0.27.1 ](https://pesde.dev/packages/pesde/selene/0.27.1/any)

... Â·  Lune


# bizwiz3/aura

v0.1.2 Â· published ...

The HTTP client for Lune. Aura is a lightweight wrapper around Lune's native net library for handling request. Inspired by Axios, it simplifies data fetching by handling JSON encoding/decoding, URL normalization, and standardized response objects automatically.

Target

Lune

This package doesn't have any dependencies.


# bizwiz3/aura

v0.1.2 Â· published ...

The HTTP client for Lune. Aura is a lightweight wrapper around Lune's native net library for handling request. Inspired by Axios, it simplifies data fetching by handling JSON encoding/decoding, URL normalization, and standardized response objects automatically.

Target

Lune

## [0.1.2 (latest)](https://pesde.dev/packages/bizwiz3/aura/0.1.2/any)

... Â·  Lune

## [0.1.1 ](https://pesde.dev/packages/bizwiz3/aura/0.1.1/any)

... Â·  Lune

## [0.1.0 ](https://pesde.dev/packages/bizwiz3/aura/0.1.0/any)

... Â·  Lune


# pesde/stylua

v2.4.0 Â· published ...

A Lua code formatter

Target

Lune

## Dependencies

### [lukadev_0/option ](https://pesde.dev/packages/lukadev_0/option/latest/lune)

^1.2.1 Â· lune

### [lukadev_0/result ](https://pesde.dev/packages/lukadev_0/result/latest/lune)

^1.2.1 Â· lune

### [pesde/toolchainlib ](https://pesde.dev/packages/pesde/toolchainlib/latest/lune)

^0.2.2 Â· lune


# pesde/stylua

v2.4.0 Â· published ...

A Lua code formatter

Target

Lune

## [2.4.0 (latest)](https://pesde.dev/packages/pesde/stylua/2.4.0/any)

... Â·  Lune

## [2.3.1 ](https://pesde.dev/packages/pesde/stylua/2.3.1/any)

... Â·  Lune

## [2.3.0 ](https://pesde.dev/packages/pesde/stylua/2.3.0/any)

... Â·  Lune

## [2.2.0+toolchainlib.1 ](https://pesde.dev/packages/pesde/stylua/2.2.0%2Btoolchainlib.1/any)

... Â·  Lune

## [2.2.0 ](https://pesde.dev/packages/pesde/stylua/2.2.0/any)

... Â·  Lune

## [2.1.0 ](https://pesde.dev/packages/pesde/stylua/2.1.0/any)

... Â·  Lune

## [2.0.2 ](https://pesde.dev/packages/pesde/stylua/2.0.2/any)

... Â·  Lune

## [2.0.1 ](https://pesde.dev/packages/pesde/stylua/2.0.1/any)

... Â·  Lune


# luausignal

[Documentation](https://ffrostfall.github.io/luausignal/docs/intro)

luausignal is a signal implementation written for modern Luau, with modern best practices.

```lua
local signal = require(path.to.signal)

local tookDamage: signal.Identity = signal()

tookDamage:connect(function(player, amount)
    print(`player { player.Name } took { amount } damage!`)
end)

tookDamage:fire(Players.theReader101, 50)

## It's a table. Don't worry about memory leaks.

luausignal is just a table, with a metatable. The connections are just functions in an array. This means that it will be garbage collected.


# DiscordLuau

### Special Thanks
A sub-section just to credit people who have committed to the Discord Luau project and cannot be represented through the GitHub contributors section.

#### Icon & Design
- [Dekkonot](https://github.com/Dekkonot) - Tilt concept
- [BlizzarBlitz](https://github.com/BizzarBlitz) - Figma troubleshooting & ideas
- [kalrnlo](https://github.com/kalrnlo) - Red ping dot
- [CompeyDev](https://github.com/CompeyDev) - Design prototype


# Creating Discord bots could feel like a

dream

All you need to make a Discord bot in a simple to use, strongly typed Luau package.

[ Get started ](https://discordluau.devcomp.xyz/home/) [ View on GitHub ](https://github.com/DiscordLuau/discord-luau)


# Creating Discord bots could feel like a

dream

All you need to make a Discord bot in a simple to use, strongly typed Luau package.

[ Get started ](https://discord-luau-docs.deno.dev/home/) [ View on GitHub ](https://github.com/DiscordLuau/discord-luau)


# DiscordLuau

[](https://discord-luau-docs.deno.dev/home/)

## About

This is the **[Discord API](https://discord.com/developers/docs/intro) [Wrapper](https://rapidapi.com/blog/api-glossary/api-wrapper/)**, the resource that you’ll be interacting with if you want to create a Discord Bot/Application! 🎉

### Project Structure

  * `init.luau`: Requires Package/init.luau
  * `/Package`: The source code for the Discord-Luau package
  *     * `/Package/Classes`: All Discord-Luau generated obejcts/classes that the user can interact with.
  *     * `/Package/Data`: Internal library ‘data’ modules, consisting of generic lua datatypes, with string values.
  *     * `/Package/Enums`: Internal library ‘enum’ files, consisting of string keys and values.
  *     * `/Package/Std`: Standard libraries that this library uses, if Discord-Luau were to switch to another Runtime, we’d just need to modify the `/Package/Std` folder to support the standard libraries for another Runtime.
  *     * `/Package/Types`: Some awkward types that we need support for in Discord Luau
  *     * `/Package/Utils`: Utility functions Discord Luau uses
  *     * `/Package/Vendor`: Vendor, external resources or packages that Discord Luau uses
  *     * `/Package/init.luau`: Entrypoint for Discord Luau

### Project Status

At the moment, I _([AsynchronousMatrix](https://github.com/4x8Matrix))_ will write to the Master branch every now and again, if I introduce breaking changes, I may put that into it’s own branch, but at the moment, since there’s no `0.1.0` version in sight, the Master branch is where I lurk, adding potentially breaking changes every now and again..!

Pull Requests are welcome! But there’s no guarntee that what has been written in that Pull Request will be merged..!

### Project Goals

  * Enabling developers to create a discord bot that connect to the Discord Websocket.
  * Send and recieve messages from a Discord websoket.
  * Take full advantage of the Discord REST Http Library.
  * Provide detailed and clear documentation on the Discord API Wrapper

## Documentation

Please head on over to the [Wiki](https://github.com/DiscordLuau/Discord-Luau/wiki) for further details, however, i’ll soon enough set up a dedicated website for Discord Luau!

## Examples

Please take a look at the [/Examples](https://github.com/DiscordLuau/Discord-Luau/tree/Master/Examples) folder under the Master branch!


# Responding with Embeds

[Embeds](https://discord.com/developers/docs/resources/channel#embed-object) are a way to display rich content in Discord messages. They allow you to include images, formatted text, fields, and other interactive elements within a message.

  1. Create a discord-luau bot implementation:

         local DiscordLuau = require("DiscordLuau")

         local DiscordSettings = DiscordLuau.SettingsBuilder.new("<DISCORD_TOKEN>")

         local DiscordClient = DiscordLuau.DiscordClient.new(DiscordSettings)

         DiscordClient.eventManager.onMessage:connect(function(message)

            if message.content == "!embed" then

               ...

            end

         end)

         DiscordClient.eventManager.onReady:connect(function()

            print(`🎉🎉 {DiscordClient.discordUser.username} is online! 🎉🎉`)

         end)

         DiscordClient:connectAsync()

  2. Allow the bot to check messages:

     * Go to the [Discord Developer Portal](https://discord.com/developers/applications)
     * Choose your bot application in the `Applications` tab
     * Go to the `Bot` tab and enable `MESSAGE CONTENT INTENT`
  3. Create a Discord embed that we can respond with:

         local responseEmbed = DiscordLuau.EmbedBuilder.new()

               :setTitle("Example Embed")

               :setDescription("This is an example of an embed created using DiscordLuau!")

               :setColor(0xFF0000)

               :addField("Field 1", "Value 1", true)

               :addField("Field 2", "Value 2", true)

               :setFooter("This is a footer")

  4. Reply to the message with the newly created embed:

         local responseMessage = DiscordLuau.MessageBuilder.new()

            local responseEmbed = DiscordLuau.EmbedBuilder.new()

               :setTitle("Example Embed")

               :setDescription("This is an example of an embed created using DiscordLuau!")

               :setColor(0xFF0000)

               :addField("Field 1", "Value 1", true)

               :addField("Field 2", "Value 2", true)

               :setFooter("This is a footer")

            message:replyAsync(responseMessage:addEmbed(responseEmbed))

See The Entire Code

    local DiscordLuau = require("DiscordLuau")

    local DiscordSettings = DiscordLuau.SettingsBuilder.new("<DISCORD_TOKEN>")

    local DiscordClient = DiscordLuau.DiscordClient.new(DiscordSettings)

    DiscordClient.eventManager.onMessage:connect(function(message)

       if message.Content == "!embed" then

          local responseMessage = DiscordLuau.MessageBuilder.new()

          local responseEmbed = DiscordLuau.EmbedBuilder.new()

             :setTitle("Example Embed")

             :setDescription("This is an example of an embed created using DiscordLuau!")

             :setColor(0xFF0000)

             :addField("Field 1", "Value 1", true)

             :addField("Field 2", "Value 2", true)

             :setFooter("This is a footer")

          message:replyAsync(responseMessage:addEmbed(responseEmbed))

       end

    end)

    DiscordClient.eventManager.onReady:connect(function()

       print(`🎉🎉 {DiscordClient.discordUser.username} is online! 🎉🎉`)

    end)

    DiscordClient:connectAsync()

That’s all! For more details, refer to the relevant docs;

  * [DiscordEmbed](https://discord-luau-docs.deno.dev/classes/objects/discordembed/)
  * [EventManager](https://discord-luau-docs.deno.dev/classes/objects/eventmanager/)
  * [DiscordMessage](https://discord-luau-docs.deno.dev/classes/objects/discordmessage/)
  * [MessageBuilder](https://discord-luau-docs.deno.dev/classes/builders/messagebuilder/)


# Environment Setup

This guide will provide a brief overview on how to setup both the [Lune](https://lune-org.github.io/docs) runtime as well as several tools that will help you in development of a DiscordLuau application.

This guide requires no prerequisite knowledge, and aims to get you up to speed, regardless of your background as a developer.

## Required

The following tools are typically required for a development environment to build a DiscordLuau application:

### Visual Studio Code

Visual Studio Code is a commonly used code editor that DiscordLuau assumes you’ll be using, there will be several references to VSCode, or branches alike VSCode in this guide.

You can get VSCode [here](https://code.visualstudio.com/).

To continue, create a new directory for project, and have opened that in VSCode.

### Rokit

[Rokit](https://github.com/rojo-rbx/rokit) is a [toolchain manager](https://en.wikipedia.org/wiki/Toolchain), enabling developers to easily download and setup project tooling.

This guide assumes that you’re using Rokit, however, you are free to use other installation methods or toolchain managers.

Please follow [these steps](https://github.com/rojo-rbx/rokit?tab=readme-ov-file#installation) to install Rokit.

Now, run the following command to set up your current working directory with Rokit:

Terminal window

    rokit init

### Luau LSP

Luau LSP is a [language server protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol) implementation for the Luau programming language. It allows for autocomplete, code analysis, and other nice-to-have features in your IDE.

Install the extension from the VSCode Marketplace or OpenVSX Registry:

  * VSCode Marketplace: <https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp>
  * OpenVSX Registry: <https://open-vsx.org/extension/JohnnyMorganz/luau-lsp>

For other IDEs, instructions may be located [here](https://github.com/JohnnyMorganz/stylua/blob/main/README.md#installation).

### Lune

Lune is a [Luau](https://luau-lang.org/) [runtime](https://en.wikipedia.org/wiki/Runtime_system), enabling us to execute our code. Lune makes it possible to utilize various I/O functionality via its standard library.

To learn more about Lune, its standard library, and installation instructions, please [read the documentation](https://lune-org.github.io/docs/)

Installing Lune can be done so through Rokit as such:

Terminal window

    rokit add lune-org/lune

To verify that Lune has installed correctly, you can execute the following command in your terminal to display your installed Lune version:

Terminal window

    lune --version

### Git

Git is primarily a [version control system](https://en.wikipedia.org/wiki/Version_control), platforms such as GitHub and GitLab allow you to publish your code as repositories.

Install it by following [this guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

## Optional

The following tools are nice-to-haves, but by all means can be skipped and/or ignored.

### Selene

[Selene](https://github.com/Kampfkarren/selene) is a [Linter](https://en.wikipedia.org/wiki/Lint_\(software\)) for Luau code, and is generally a healthy tool to use to determine poor quality code in your project.

Using Rokit, it can be installed by running:

Terminal window

    rokit add Kampfkarren/selene

### StyLua

StyLua is an opinionated code formatter for Luau projects, which formats your code to be easily readable.

To install StyLua, follow [this guide](https://github.com/JohnnyMorganz/stylua/blob/main/README.md#installation).

Using Rokit, this would look like:

Terminal window

    rokit add JohnnyMorganz/stylua

## Conclusion

You now have the tools to start developing a Discord application using DiscordLuau!

The following is a `rokit.toml` file containing all of the above tools, you can compare what you have to this to ensure everything is correctly installed! Do note that this contains the latest versions of the tools at the time of writing this guide, and these versions may change in the future.

    [tools]

    lune = "lune-org/lune@0.8.4"

    stylua = "JohnnyMorganz/StyLua@0.20.0"

    selene = "Kampfkarren/selene@0.27.1"

    luau-lsp = "JohnnyMorganz/luau-lsp@1.24.1"

Additionally, you should also have the following applications avaliable in the command line:

Terminal window

    git -v

Terminal window

    rokit -V

and finally, you’ve installed a code editor/IDE, such as Visual Studio Code!


# ModalBuilder

ModalBuilder is used to construct a modal dialog for a Discord interaction, including title and components.

Usage:

    local modal = ModalBuilder.new("modal_id")

      :setTitle("Example Modal")

      :addComponent(ButtonBuilder.new("button_id"))

## Properties

The ModalBuilder instance has no set properties!

## Methods

### setTitle

> ModalBuilder : setTitle (
>  title:  string
> ) -> Builders.ModalBuilder

Sets the title of the modal.

### addComponent

> ModalBuilder : addComponent (
>  componentObject:  DiscordComponentTypes.DiscordComponent
> ) -> Builders.ModalBuilder

Adds a component to the modal. The modal can contain up to five components.

### toPayloadObject

> ModalBuilder : toPayloadObject () -> Network.Resolvable

Converts the modal to a JSON object that can be sent to the Discord API.

## Functions

### new

> ModalBuilder . new (
>  modalId:  string
> ) -> ()

Creates a new instance of ModalBuilder.


# DiscordPermission

Represents a set of Discord permissions.

## Properties

### permissions

DiscordPermission.permissions ::  [{ number }](https://www.lua.org/pil/2.3.html)

## Methods

The DiscordPermission instance has no set methods!

## Functions

The DiscordPermission instance has no set functions!


# GuildAnnouncementThreadChannel

Represents the implementation of a Discord Announcement thread channel.

## Properties

### ownerId

GuildAnnouncementThreadChannel.ownerId ::  string

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### messageCount

GuildAnnouncementThreadChannel.messageCount ::  number

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### memberCount

GuildAnnouncementThreadChannel.memberCount ::  number

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### totalMessageSent

GuildAnnouncementThreadChannel.totalMessageSent ::  number

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### threadMetadata

GuildAnnouncementThreadChannel.threadMetadata ::  {
archived: [boolean](https://www.lua.org/pil/2.2.html),
autoArchiveDuration: [number](https://www.lua.org/pil/2.3.html),
archiveTimestamp: [string](https://www.lua.org/pil/2.4.html),
locked: [boolean](https://www.lua.org/pil/2.2.html),
invitable: [boolean?](https://www.lua.org/pil/2.2.html),
createTimestamp: [string?](https://www.lua.org/pil/2.4.html),

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### availableTags

GuildAnnouncementThreadChannel.availableTags ::  {
{ id: [string](https://www.lua.org/pil/2.4.html),
name: [string](https://www.lua.org/pil/2.4.html),
moderated: [boolean](https://www.lua.org/pil/2.2.html),
emojiId: [string?](https://www.lua.org/pil/2.4.html),
emojiName: [string?](https://www.lua.org/pil/2.4.html),

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### appliedTags

GuildAnnouncementThreadChannel.appliedTags ::  [{ string }](https://www.lua.org/pil/2.4.html)

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### defaultReactionEmoji

GuildAnnouncementThreadChannel.defaultReactionEmoji ::  Objects.DiscordEmoji

> This property was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

## Methods

### joinThreadAsync

> GuildAnnouncementThreadChannel : joinThreadAsync () -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[unknown](https://discord-luau-docs.deno.dev/classes/unknown)>

Joins the current discord bot into the thread

> This function was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### addMemberToThreadAsync

> GuildAnnouncementThreadChannel : addMemberToThreadAsync (
>  userId:  string
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[unknown](https://discord-luau-docs.deno.dev/classes/unknown)>

Adds the passed member to the thread channel

> This function was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### leaveThreadAsync

> GuildAnnouncementThreadChannel : leaveThreadAsync () -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[unknown](https://discord-luau-docs.deno.dev/classes/unknown)>

Leaves the thread channel if the discord bot is in the channel.

> This function was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### removeMemberFromThreadAsync

> GuildAnnouncementThreadChannel : removeMemberFromThreadAsync (
>  userId:  string
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[unknown](https://discord-luau-docs.deno.dev/classes/unknown)>

Removes the passed user id from the current thread channel

> This function was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### getThreadMemberAsync

> GuildAnnouncementThreadChannel : getThreadMemberAsync (
>  userId:  string
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[{ DiscordGuildMember }](https://discord-luau-docs.deno.dev/classes/discordguildmember)>

Returns a list of members that are active in the current thread channel

> This function was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

### removeMemberFromThreadAsync

> GuildAnnouncementThreadChannel : removeMemberFromThreadAsync (
>  userId:  string
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[{ DiscordGuildMember }](https://discord-luau-docs.deno.dev/classes/discordguildmember)>

Returns a list of members that are active in the current thread channel

> This function was inherited from [Objects.BaseGuildThread](https://discord-luau-docs.deno.dev/classes/objects/guildannouncementthreadchannel/Objects.BaseGuildThread)

## Functions

The GuildAnnouncementThreadChannel instance has no set functions!


# IntentsBuilder

IntentsBuilder is used to construct intents for a Discord bot, specifying which events the bot will receive.

Usage:

    local DiscordLuau = require("../Submodules/DiscordLuau")

    local IntentsBuilder = DiscordLuau.IntentsBuilder.fromAll()

    local DiscordSettings = DiscordLuau.DiscordSettings.new("BOT TOKEN", IntentsBuilder)

## Properties

The IntentsBuilder instance has no set properties!

## Methods

The IntentsBuilder instance has no set methods!

## Functions

### new

> IntentsBuilder . new (
>  intentList:  [{ string }](https://www.lua.org/pil/2.4.html)
> ) -> ()

Creates a new instance of IntentsBuilder with the specified intents.

### fromDefault

> IntentsBuilder . fromDefault () -> ()

Creates a new instance of IntentsBuilder with the default intents.

### fromAll

> IntentsBuilder . fromAll () -> ()

Creates a new instance of IntentsBuilder with all available intents.


# SettingsBuilder

A simple class to retain some generic data before a Discord Client can be started, for instance:

  * The Discord bot token/authentication
  * The Discord bot intents

Usage:

    local DiscordLuau = require("../Submodules/DiscordLuau")

    local IntentsBuilder = DiscordLuau.IntentsBuilder.fromAll()

    local SettingsBuilder = DiscordLuau.SettingsBuilder.new("BOT TOKEN", IntentsBuilder)

## Properties

The SettingsBuilder instance has no set properties!

## Methods

### setDiscordToken

> SettingsBuilder : setDiscordToken (
>  discordToken:  string
> ) -> Builders.SettingsBuilder

Sets the Discord bot token.

### setIntents

> SettingsBuilder : setIntents (
>  discordIntents:  IntentsBuilder
> ) -> Builders.SettingsBuilder

Sets the Discord bot intents.

## Functions

### new

> SettingsBuilder . new (
>  discordToken:  string
>  discordIntents:  IntentsBuilder?
> ) -> ()

Constructs a new instance of SettingsBuilder.


# WebsocketBuffer

The `WebsocketBuffer` class manages a buffer for websocket data, allowing for data to be added incrementally and flushed when needed.

## Properties

### data

WebsocketBuffer.data ::  string

### data

WebsocketBuffer.data ::  any

### type

WebsocketBuffer.type ::  string

### eventOutMiddleware

WebsocketBuffer.eventOutMiddleware ::  Network.EventOut

### eventInMiddleware

WebsocketBuffer.eventInMiddleware ::  Network.EventIn

### metadata

WebsocketBuffer.metadata ::  {
{ headers: { [string]: string } }

## Methods

### flush

> WebsocketBuffer : flush (
>  self:  WebsocketBuffer
> ) -> string

Flushes the buffer, returning all accumulated data and resetting the buffer.

### add

> WebsocketBuffer : add (
>  self:  WebsocketBuffer
>  data:  string
> ) -> ()

Adds data to the buffer.

## Functions

### new

> WebsocketBuffer . new () -> ()

Creates a new instance of `WebsocketBuffer`.


# GuildOnboardingPrompt

The `GuildOnboardingPrompt` class provides a way for developers to interact with a guild onboarding prompt.

## Properties

### id

GuildOnboardingPrompt.id ::  string

### type

GuildOnboardingPrompt.type ::  number

### options

GuildOnboardingPrompt.options ::  [{ Objects.GuildOnboardingPromptOption }](https://discord-luau-docs.deno.dev/classes/objects/guildonboardingpromptoption)

### title

GuildOnboardingPrompt.title ::  string

### singleSelect

GuildOnboardingPrompt.singleSelect ::  boolean

### required

GuildOnboardingPrompt.required ::  boolean

### inOboarding

GuildOnboardingPrompt.inOboarding ::  boolean

### type

GuildOnboardingPrompt.type ::  string

The type of the GuildOnboardingPrompt. Default is “GuildOnboardingPrompt”.

## Methods

The GuildOnboardingPrompt instance has no set methods!

## Functions

### new

> GuildOnboardingPrompt . new () -> ()

Creates a new GuildOnboardingPrompt instance.


# SelectionBuilder

SelectionBuilder is used to construct a selection (dropdown) component for a Discord message.

## Properties

### Type

SelectionBuilder.Type ::  table

An enumeration of selection types.

  * TextSelection: 3
  * UserSelection: 5
  * RoleSelection: 6
  * MentionableSelection: 7
  * ChannelSelection: 8

### ChannelType

SelectionBuilder.ChannelType ::  table

An enumeration of channel types.

  * GuildText: 0
  * DirectMessage: 1
  * GuildVoice: 2
  * GroupDirectMessage: 3
  * GuildCategory: 4
  * GuildAnnouncement: 5
  * AnnouncementThread: 10
  * PublicThread: 11
  * PrivateThread: 12
  * GuildStageVoice: 13
  * GuildDirectory: 14
  * GuildForum: 15

## Methods

### setType

> SelectionBuilder : setType (
>  selectionType:  number
> ) -> Builders.Interface.SelectionBuilder

Sets the type of the selection.

### setChannelTypes

> SelectionBuilder : setChannelTypes (
>  ...:  number
> ) -> Builders.Interface.SelectionBuilder

Sets the channel types for the selection.

### setPlaceholder

> SelectionBuilder : setPlaceholder (
>  placeholderText:  string
> ) -> Builders.Interface.SelectionBuilder

Sets the placeholder text for the selection.

### setDisabled

> SelectionBuilder : setDisabled (
>  isDisabled:  boolean
> ) -> Builders.Interface.SelectionBuilder

Sets whether the selection is disabled.

### setMinValues

> SelectionBuilder : setMinValues (
>  minValue:  number
> ) -> Builders.Interface.SelectionBuilder

Sets the minimum number of values that must be selected.

### setMaxValues

> SelectionBuilder : setMaxValues (
>  maxValue:  number
> ) -> Builders.Interface.SelectionBuilder

Sets the maximum number of values that can be selected.

### addChoice

> SelectionBuilder : addChoice (
>  choiceName:  string
>  choiceValue:  string
>  choiceDescription:  string
>  isDefault:  boolean
>  emojiId:  string?
>  emojiName:  string?
> ) -> Builders.Interface.SelectionBuilder

Adds a choice to the selection.

### destroyChoice

> SelectionBuilder : destroyChoice (
>  choiceName:  string
> ) -> Builders.Interface.SelectionBuilder

Removes a choice from the selection.

### toPayloadObject

> SelectionBuilder : toPayloadObject () -> Network.Resolvable

Converts the selection to a JSON object that can be sent to the Discord API.

## Functions

### new

> SelectionBuilder . new (
>  selectionId:  string
> ) -> ()

Creates a new instance of SelectionBuilder.


# BaseUserChannel

A base User channel, allwoing bots to interact with channels outside of a discord Guild.

## Properties

### id

BaseUserChannel.id ::  string

### recipients

BaseUserChannel.recipients ::  [{ Objects.DiscordUser }](https://discord-luau-docs.deno.dev/classes/objects/discorduser)

### id

BaseUserChannel.id ::  string

> This property was inherited from [Objects.BaseDiscordChannel](https://discord-luau-docs.deno.dev/classes/objects/baseuserchannel/Objects.BaseDiscordChannel)

### type

BaseUserChannel.type ::  number

> This property was inherited from [Objects.BaseDiscordChannel](https://discord-luau-docs.deno.dev/classes/objects/baseuserchannel/Objects.BaseDiscordChannel)

## Methods

### triggerTypingIndicator

> BaseUserChannel : triggerTypingIndicator () -> Vendor.Future

Triggers the typing indicator in the channel.

### getMessagesAsync

> BaseUserChannel : getMessagesAsync (
>  limit:  number?
> ) -> Vendor.Future

Gets messages from the channel asynchronously.

### getMessageAsync

> BaseUserChannel : getMessageAsync (
>  messageId:  string
> ) -> Vendor.Future

Gets a specific message from the channel asynchronously.

### bulkDeleteMessagesAsync

> BaseUserChannel : bulkDeleteMessagesAsync (
>  messageIds:  [{string}](https://www.lua.org/pil/2.4.html)
> ) -> Vendor.Future

Deletes multiple messages from the channel asynchronously.

### sendMessageAsync

> BaseUserChannel : sendMessageAsync (
>  messageBuilder:  MessageBuilder
> ) -> Vendor.Future

Sends a message to the channel asynchronously.

### getPinnedMessagesAsync

> BaseUserChannel : getPinnedMessagesAsync () -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<{[number]: DiscordMessage}>

Retrieves the pinned messages in the text channel asynchronously.

### deleteAsync

> BaseUserChannel : deleteAsync () -> Vendor.Future

Deletes the channel asynchronously.

> This function was inherited from [Objects.BaseDiscordChannel](https://discord-luau-docs.deno.dev/classes/objects/baseuserchannel/Objects.BaseDiscordChannel)

## Functions

The BaseUserChannel instance has no set functions!


# OnboardingPromptOptionBuilder

OnboardingPromptOptionBuilder allows you to build onboarding for discord guilds.

Usage:

    local DiscordLuau = require("../Submodules/DiscordLuau")

    local OnboardingPromptOptionBuilder = DiscordLuau.OnboardingPromptOptionBuilder.new()

      :setTitle("option-name")

      :setDescription("Option Description!")

## Properties

The OnboardingPromptOptionBuilder instance has no set properties!

## Methods

### setTitle

> OnboardingPromptOptionBuilder : setTitle (
>  title:  string
> ) -> Builders.OnboardingPromptOptionBuilder

Sets the title of the Prompt Option builder

### setDescription

> OnboardingPromptOptionBuilder : setDescription (
>  description:  string
> ) -> Builders.OnboardingPromptOptionBuilder

Sets the description of the Prompt Option builder

### addChannelId

> OnboardingPromptOptionBuilder : addChannelId (
>  channelId:  string
> ) -> Builders.OnboardingPromptOptionBuilder

Add a channel id to the prompt option builder

### addRoleId

> OnboardingPromptOptionBuilder : addRoleId (
>  roleId:  string
> ) -> Builders.OnboardingPromptOptionBuilder

Add a role id to the prompt option builder

### setEmoji

> OnboardingPromptOptionBuilder : setEmoji (
>  emojiId:  string
>  emojiName:  string
>  emojiAnimated:  boolean?
> ) -> Builders.OnboardingPromptOptionBuilder

Sets the emoji of the Onboarding Prompt Option Builder

## Functions

### new

> OnboardingPromptOptionBuilder . new (
>  intentList:  [{ string }](https://www.lua.org/pil/2.4.html)
> ) -> ()

Creates a new instance of OnboardingPromptOptionBuilder with the specified intents.


# Console

The `Vendor.Console` module is a third-party library used within Discord-Luau for logging and debugging purposes. This module may contain modifications to better integrate with the Discord-Luau framework.

Original module can be found at: <https://docs.asyncmatrix.dev/Packages/Console>

## Properties

The Console instance has no set properties!

## Methods

The Console instance has no set methods!

## Functions

The Console instance has no set functions!


# DiscordCache

The `DiscordCache` class provides a caching mechanism for storing and retrieving data associated with Discord objects.

## Properties

### cache

DiscordCache.cache ::  {
{ [string]: any } }

### type

DiscordCache.type ::  string

The type of the DiscordCache. Default is “DiscordCache”.

## Methods

### setData

> DiscordCache : setData (
>  cacheType:  string
>  uuid:  string
>  data:  any
> ) -> ()

Sets data in the cache.

### getData

> DiscordCache : getData (
>  cacheType:  string
>  uuid:  string
> ) -> any

Gets data from the cache.

### getDataOr

> DiscordCache : getDataOr (
>  cacheType:  string
>  uuid:  string
>  callback:  function
> ) -> any

Gets data from the cache, or calls a callback to generate and cache the data if not found.

## Functions

### new

> DiscordCache . new () -> ()

Creates a new DiscordCache instance.


# EndpointCache

EndpointCache is a caching mechanism designed to store data temporarily with an expiration time.

## Properties

### expiry

EndpointCache.expiry ::  number

## Methods

### setExpiry

> EndpointCache : setExpiry (
>  seconds:  number
> ) -> ()

Sets the expiry time for the cache.

### set

> EndpointCache : set (
>  value:  any
> ) -> ()

Sets the value in the cache and starts the expiry timer.

### get

> EndpointCache : get () -> any

Gets the current value from the cache.

## Functions

### new

> EndpointCache . new (
>  expiryTime:  number?
> ) -> ()

Creates a new instance of EndpointCache.


# BaseDiscordGuildChannel

Represents a base object for any/all guild channels.

## Properties

### guildId

BaseDiscordGuildChannel.guildId ::  string

### topic

BaseDiscordGuildChannel.topic ::  string

### nsfw

BaseDiscordGuildChannel.nsfw ::  boolean

### rateLimitPerUser

BaseDiscordGuildChannel.rateLimitPerUser ::  number

### parentId

BaseDiscordGuildChannel.parentId ::  string

### flags

BaseDiscordGuildChannel.flags ::  number

### id

BaseDiscordGuildChannel.id ::  string

> This property was inherited from [Objects.BaseDiscordChannel](https://discord-luau-docs.deno.dev/classes/objects/basediscordguildchannel/Objects.BaseDiscordChannel)

### type

BaseDiscordGuildChannel.type ::  number

> This property was inherited from [Objects.BaseDiscordChannel](https://discord-luau-docs.deno.dev/classes/objects/basediscordguildchannel/Objects.BaseDiscordChannel)

## Methods

### overwriteRolePermissionsAsync

> BaseDiscordGuildChannel : overwriteRolePermissionsAsync (
>  roleId:  string
>  allowedPermissions:  PermissionsBuilder.PermissionsBuilder
>  disallowedPermissions:  PermissionsBuilder.PermissionsBuilder
> ) -> Vendor.Future

set overwrites for a specific role permissions for this channel in a discord guild.

### overwriteMemberPermissionssync

> BaseDiscordGuildChannel : overwriteMemberPermissionssync (
>  memberId:  string
>  allowedPermissions:  PermissionsBuilder.PermissionsBuilder
>  disallowedPermissions:  PermissionsBuilder.PermissionsBuilder
> ) -> Vendor.Future

set overwrites for a specific members permissions for this channel in a discord guild.

### overwriteMemberPermissionssync

> BaseDiscordGuildChannel : overwriteMemberPermissionssync (
>  roleIdOrUserId:  string
> ) -> Vendor.Future

deletes overwritten permissions for the given id, the given id must be either a role id or a user id

### getInvitesAsync

> BaseDiscordGuildChannel : getInvitesAsync () -> Vendor.Future

Gets the invites for the channel asynchronously.

### createInviteAsync

> BaseDiscordGuildChannel : createInviteAsync (
>  maxAge:  number?
>  maxUses:  number?
>  temporary:  boolean?
> ) -> Vendor.Future

Creates an invite for the channel asynchronously.

### setPositionAsync

> BaseDiscordGuildChannel : setPositionAsync (
>  position:  number
>  parentId:  string?
>  syncPermissions:  boolean?
> ) -> Vendor.Future

Sets the position of the channel asynchronously.

### modifyAsync

> BaseDiscordGuildChannel : modifyAsync (
>  channelBuilder:  ChannelBuilder.ChannelBuilder
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[unknown](https://discord-luau-docs.deno.dev/classes/unknown)>

Modifies the thread channel settings asynchronously.

### getPublicArchivedThreadsAsync

> BaseDiscordGuildChannel : getPublicArchivedThreadsAsync (
>  epoch:  number?
>  limit:  number?
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[{ number }](https://www.lua.org/pil/2.3.html)>

Gets all archived public threads in the guild channel asynchronously.

### getPrivateArchivedThreadsAsync

> BaseDiscordGuildChannel : getPrivateArchivedThreadsAsync (
>  epoch:  number?
>  limit:  number?
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[{ number }](https://www.lua.org/pil/2.3.html)>

Gets all archived private threads in the guild channel asynchronously.

### getJoinedPrivateArchivedThreads

> BaseDiscordGuildChannel : getJoinedPrivateArchivedThreads (
>  epoch:  number?
>  limit:  number?
> ) -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[{ number }](https://www.lua.org/pil/2.3.html)>

Gets all archived private threads that the bot is a member of, in the guild channel asynchronously.

### deleteAsync

> BaseDiscordGuildChannel : deleteAsync () -> Vendor.Future

Deletes the channel asynchronously.

> This function was inherited from [Objects.BaseDiscordChannel](https://discord-luau-docs.deno.dev/classes/objects/basediscordguildchannel/Objects.BaseDiscordChannel)

## Functions

The BaseDiscordGuildChannel instance has no set functions!


# DiscordInteraction

The `DiscordInteraction` class represents an interaction with the Discord API, such as a message interaction, a command, or a modal submission.

## Properties

### channel

DiscordInteraction.channel ::  Objects.DiscordChannel

### guild

DiscordInteraction.guild ::  objects.DiscordGuild

### user

DiscordInteraction.user ::  objects.DiscordUser

### token

DiscordInteraction.token ::  string

### applicationId

DiscordInteraction.applicationId ::  string

### id

DiscordInteraction.id ::  string

### data

DiscordInteraction.data ::  {
{ [any]: any } }

### channelId

DiscordInteraction.channelId ::  string

### guilldId

DiscordInteraction.guilldId ::  string

### version

DiscordInteraction.version ::  number

### appPermissions

DiscordInteraction.appPermissions ::  Builders.PermissionsBuilder

### guildLocale

DiscordInteraction.guildLocale ::  string

### locale

DiscordInteraction.locale ::  string

### deferred

DiscordInteraction.deferred ::  boolean

### type

DiscordInteraction.type ::  string

The type of the DiscordInteraction. Default is “DiscordInteraction”.

## Methods

### editMessageAsync

> DiscordInteraction : editMessageAsync (
>  messageBuilder:  MessageBuilder
> ) -> Vendor.Future

Edits the original interaction response message asynchronously.

### sendModalAsync

> DiscordInteraction : sendModalAsync (
>  modalObject:  ModalBuilder
> ) -> Vendor.Future

Sends a modal in response to the interaction asynchronously.

### sendMessageAsync

> DiscordInteraction : sendMessageAsync (
>  messageBuilder:  MessageBuilder
> ) -> Vendor.Future

Sends a message in response to the interaction asynchronously.

### deferAsync

> DiscordInteraction : deferAsync () -> Vendor.Future

Defers the interaction response asynchronously.

## Functions

### new

> DiscordInteraction . new (
>  discordClient:  any
>  jsonData:  table
> ) -> ()

Creates a new DiscordInteraction instance.


# GuildStageVoiceChannel

Represents the implementation of a Discord Stage channel.

## Properties

### id

GuildStageVoiceChannel.id ::  string

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### guildId

GuildStageVoiceChannel.guildId ::  string

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### voiceConnection

GuildStageVoiceChannel.voiceConnection ::  Network.DiscordVoiceConnection?

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### bitrate

GuildStageVoiceChannel.bitrate ::  number

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### userLimit

GuildStageVoiceChannel.userLimit ::  number

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### rtcRegion

GuildStageVoiceChannel.rtcRegion ::  string

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### videoQualityMode

GuildStageVoiceChannel.videoQualityMode ::  number

> This property was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

## Methods

### connectAsync

> GuildStageVoiceChannel : connectAsync () -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[boolean](https://www.lua.org/pil/2.2.html)>

Connects to the voice channel asynchronously.

> This function was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

### disconnectAsync

> GuildStageVoiceChannel : disconnectAsync () -> [Vendor.Future](https://discord-luau-docs.deno.dev/classes/vendor/future)<[unknown](https://discord-luau-docs.deno.dev/classes/unknown)>

Disconnects from the voice channel asynchronously.

> This function was inherited from [Objects.BaseGuildVoiceChannel](https://discord-luau-docs.deno.dev/classes/objects/guildstagevoicechannel/Objects.BaseGuildVoiceChannel)

## Functions

The GuildStageVoiceChannel instance has no set functions!


# CommandBuilder

CommandBuilder is used to construct a command for a Discord application, including type, name, description, and options.

Usage:

    local command = CommandBuilder.new()

      :setType(CommandBuilder.Type.ChatInput)

      :setName("example_command")

      :setDescription("This is an example command.")

      :setNSFW(false)

      :setDMPermission(true)

      :setDefaultPermissionEnabled(true)

      :addOption(CommandOptionBuilder.new():setType(CommandOptionBuilder.Type.String):setName("option1"):setDescription("An option"))

## Properties

### Type

CommandBuilder.Type ::  table

An enumeration of command types.

  * ChatInput: 1
  * UserContextAction: 2
  * MessageContextAction: 3

### Context

CommandBuilder.Context ::  table

An enumeration of command contexts.

  * Guild: 0
  * BotDM: 1
  * PrivateChannel: 2

### IntegrationType

CommandBuilder.IntegrationType ::  table

An enumeration of command integration contexts.

  * GuildCommand: 0
  * UserCommand: 1

## Methods

### setType

> CommandBuilder : setType (
>  commandType:  number
> ) -> Builders.CommandBuilder

Sets the type of the command.

### setLocalization

> CommandBuilder : setLocalization (
>  localizationCode:  string
> ) -> Builders.CommandBuilder

Sets the localization code for the command.

### setDescription

> CommandBuilder : setDescription (
>  description:  string
> ) -> Builders.CommandBuilder

Sets the description of the command.

### setName

> CommandBuilder : setName (
>  name:  string
> ) -> Builders.CommandBuilder

Sets the name of the command.

### setNSFW

> CommandBuilder : setNSFW (
>  isNSFW:  boolean
> ) -> Builders.CommandBuilder

Sets whether the command is NSFW.

### setGuildPermissions

> CommandBuilder : setGuildPermissions (
>  permissionObject:  PermissionsBuilder
> ) -> Builders.CommandBuilder

Sets the required permissions for the command in a guild.

### addOption

> CommandBuilder : addOption (
>  commandObject:  CommandOptionBuilder
> ) -> Builders.CommandBuilder

Adds an option to the command.

### addContext

> CommandBuilder : addContext (
>  context:  number
> ) -> Builders.CommandBuilder

Adds a context to the command.

### addIntegration

> CommandBuilder : addIntegration (
>  integration:  IntegrationType
> ) -> Builders.CommandBuilder

Adds an intergration to the command.

### toPayloadObject

> CommandBuilder : toPayloadObject () -> Network.Resolvable

Converts the command to a JSON object that can be sent to the Discord API.

## Functions

### new

> CommandBuilder . new () -> ()

Creates a new instance of CommandBuilder.


# roblox-luau-polyfill
A set of utilities to mimic common JS polyfills needed for translating projects from JS to Lua/Luau


# B2?

b2264644-3d77-4ab9-8a00-5e9ffb0ff964 is a robust, fast, and lightweight entity component system for Luau. It is fully
unit-tested, and supports modern features on-par with similar libraries. B2 is still early in development (pre-1.0), so,
expect breaking changes on updates to 0.**X**.0 versions.

## Why not B2?

B2 is still very early in development. Naturally, this comes with bugs, breaking changes, and an immature ecosystem.
I try my best to mitigate the former two with thorough unit tests, and a clear versioning scheme. However, if you choose
to start using B2, beware the challenges that face early adopters of new software. Additionally, B2 includes (some)
guarantees regarding querying safety which may hurt performance (benchmarks yet-to-be-seen).

## Installation

You can install b226 via [Wally](https://wally.run/package/hardlyardi/b226?version=0.2.3). As of right now, B2 is only one file at `src/init.luau`

## Special Thanks

Special thanks to [Marcus](https://github.com/ukendio/), [Sona](https://github.com/SolarScuffle-Bot), and others for
making B2 possible. If you haven't seen [Jecs](https://github.com/ukendio/jecs) or you like B2, I think you should
check it out. I learnt a lot about ECS from Jecs, and it's an awesome project.

# Concepts

## ECS

You need to create an ECS object to start using B2. It acts as storage for entities and their components, allows you to
query for state, and more. There is no limit to how many ECS objects you can create.

```luau
local b2 = require(path.to.b2)
-- first argument is whether or not you're using the new solver
local ecs = b2.ecs(false)

## Entities

Entities represent containers for data in a game. Your game might have entities which look like characters, map objects,
projectiles, particles, etc. At the simplest level, an entity is a unique identifier capable of containing data.
To give life to an entity, you'll need to add Components. For now, I'll use the built-in
component `b2.Name` as an example.

```luau
-- creates a new entity with no components and returns its identifier
local alice = ecs.entity()

ecs.set(alice, b2.Name, "Alice")
ecs.get(alice, b2.Name) --> "Alice"

By itself, an entity is just a unique number, and has no data. Using `ecs.contains`, you can check if an identifier
exists as a valid entity.

```luau
ecs.contains(alice) --> true

## Base Operations

In the ECS, there are five base operations which can act on a single entity. These operations are `add`, `set`, `get`,
`remove`, and `clear`.

### `ecs.add(entity, Component)`

Adds a component to an entity. If the entity already has the component, this will do nothing.

### `ecs.set(entity, Component, Value)`

Sets the value of a component for an entity. If the component does not exist on the entity, it will be added.

### `ecs.get(entity, Component, Components...): Values...`

Returns the value of each component passed from an entity.

### `ecs.remove(entity, Component)`

Removes a component from an entity. If the entity did not have the component, this will do nothing.

### `ecs.clear(entity, delete?)`

Removes all references to this entity in the ECS storage. If `delete` is specified, the entity will have all of its
components removed, and be removed from the world. Entities which are not deleted will take up memory.

## Bulk Operations

Bulk operations are like the base entity operations mentioned before, except they may operate on multiple components at
a time. There is some overhead from executing a bulk operation, but it should generally be very fast. You can expect
bulk operations to mostly behave the same as regular entity operations being repeated.

### `ecs.bulk_add(entity, { Components })`

Adds a list of components to an entity.

### `ecs.bulk_remove(entity, { Components })`

Removes a list of components from an entity.

### `ecs.bulk_set(entity, { Components }, { Value })`

Sets the values for a list of components for an entity.

### `ecs.bulk_get(entity, { Components }): { Values }`

Gets a list of values from a list of components from an entity.

## Components are Entities

In the ECS, Components need unique Identifiers, just like entities. In B2, this problem is solved by making each
component a unique entity of its own. Because components are entities, you can apply components to other components. You
can use `ecs.has` with `b2.Component` to check if an Id is a component:

```luau
local entity = ecs.entity()
local Component = ecs.component()
ecs.has(entity, b2.Component) --> false
ecs.has(Component, b2.Component) --> true

If a game has a component, that means that component is an entity, and you can give it metadata. Components which are
applied to components will be referred to as 'traits' from here on.

```luau
local Position = ecs.component() :: b2.Id<Vector3>
-- Using regular APIs to set traits on components!
ecs.set(Position, b2.Name, "Position")

print(`{ecs.get(Position, b2.Name)} is a Component: {ecs.has(Position, b2.Component)}`);

### Entities are Components (Tags)

Entities can also be used as a kind of component called a 'Tag'. This is a component with no data, but which can be
checked with `ecs.has(e, Tag)`:

```luau
local IsAwesome = ecs.entity()

local bob = ecs.entity()
ecs.add(bob, IsAwesome)
ecs.has(bob, IsAwesome) --> true

## Queries

Queries are the main method for you to look for a group of entities and operate on them. Queries are used for a lot of
things, but a simple example is looking for a single component.

```luau
local Tag = ecs.entity()
local alice = ecs.entity()
local bob = ecs.entity()
ecs.set(alice, Name, "Alice")
ecs.add(alice, Tag)
ecs.set(bob, Name, "Bob")
ecs.add(bob, Tag)

for entity, name in ecs.query(Name):with(Tag):entities() do
    print(entity, name)
end
-- Output:
--  1026 Alice
--  1027 Bob

`query:entities()` can be run multiple times and the query will remain accurate. E.g.,

```luau
local Tag = ecs.entity()
local e1 = ecs.entity()
local e2 = ecs.entity()
ecs.add(e1, Tag)
local q = ecs.query(Tag):without(Name)
for e in q:entities() do
    print(e) -- outputs only e1
end
ecs.add(e2, Tag)
for e in q:entities() do
    print(e) -- outputs e1 and e2
end

## Relationships

Entity relationships make it possible to describe a graph of entities efficiently in your data.

Adding/removing relationships is similar to adding/removing regular components, with as difference that instead of a
single component id, a relationship adds a pair of two things to an entity. In this pair, the first element represents
the relationship (e.g. "Eats"), and the second element represents the target (e.g. "Apples").

Relationships can be used to describe many things, from hierarchies, to status effects, to even transactions between
player inventories. They can be created with `b2.pair(relationship, target)`. To get the target of a relationship, use
`ecs.target`:

### `ecs.target(e, rel, idx?)`

Gets the target of a relationship. A relationship is nonexclusive, meaning it can have multiple targets. Because of
this, `target` has an optional index - which starts at and will default to zero. This could be used to iterate all
targets of a relationship for an entity.

More info can be found on the
[Jecs Documentation](https://ukendio.github.io/jecs/learn/overview.html#relationships).

## Exclusive Relationships

You can mark a tag or component as an exclusive relationship (i.e., it may only have one target at a time) with
`b2.Exclusive`:

```luau
local ChildOf = ecs.component()
ecs.add(ChildOf, b2.Exclusive)

local e1 = ecs.entity()
local e2 = ecs.entity()
local e3 = ecs.entity()

ecs.add(e3, pair(ChildOf, e1))
-- Removes the previous pair from e3, and sets a new target
ecs.add(e3, pair(ChildOf, e2))

## Wildcards

`b2.Wildcard` pairs allow you to query for less 'Specific' relationships. `pair(relation, Wildcard)` and
`pair(Wildcard, target)` are both valid for queries.

```luau
for entity in ecs.query(pair(Likes, b2.Wildcard)):entities() do
    print(`entity {entity} likes {ecs.target(entity, Likes)}`)
end

## Cleanup Traits

When entities that are used as tags, components, relationships or relationship targets are deleted, cleanup traits
ensure that the store does not contain any dangling references. Any cleanup policy provides this guarantee, so while
they are configurable, games cannot configure traits that allows for dangling references.

To configure a cleanup policy for an entity, a (Condition, Action) pair can be added to it. If no policy is specified,
the id will be removed on cleanup.

Right now, there are six cleanup conditions:

- `OnClear`: the component or tag is cleared or deleted.
- `OnClearTarget`: a target used with the relationship is cleared or deleted.
- `OnClearAsRelation`: this entity is the first part of a relationship pair, and is being cleared or deleted.
- `OnDelete`: the component or tag is deleted.
- `OnDeleteTarget`: a target used with the relationship is deleted.
- `OnDeleteAsRelation`: this entity is the first part of a relationship pair, and is being deleted.

And one cleanup action:

- `CleanupDelete`: When the condition is met, entities with this ID will be deleted.

### pair(OnClear, CleanupDelete)

```luau
local Archer = ecs.component()
ecs.add(Archer, b2.pair(b2.OnClear, b2.CleanupDelete))

local e = ecs.entity()
ecs.add(e, Archer)

-- This will delete e because Archer has an (OnClear, CleanupDelete) trait.
ecs.clear(Archer, true)

### (CleanupOnClearTarget, CleanupDelete)

```luau
local ChildOf = ecs.component()
ecs.add(ChildOf, pair(b2.CleanupOnClearTarget, b2.CleanupDelete))
ecs.add(ChildOf, b2.Exclusive)

local parent = ecs.entity()
local child = ecs.entity()
ecs:add(child, pair(ChildOf, parent))

-- This will delete both parent and child
ecs.clear(parent, true)

## Hooks

Sometimes you may want to ensure certain things are true of your components. For example, you may want to make sure that
any entity which recieves an Interactable component also creates a ProximityPrompt and has a component to represent it.
This is where hooks come in.

There are three typs of hooks. `OnAdd`, `OnChange`, and `OnRemove`. You can set traits for a components' hooks via
`ecs.set(Component, On*, callback)`. The callback is defined for each as:

```luau
type OnAdd<Data> = (entity: Ent, id: Ent<Data>, data: Data) -> ()
type OnChange<Data> = (entity: Ent, id: Ent<Data>, data: Data) -> ()
type OnRemove<Data> = (entity: U53, id: Ent<Data>) -> ()

Once a Component exists on any entity, hook callbacks for that Component cannot ever be safely added, changed, or
removed. To check if modifying a Component's hooks is 'safe', you may use `ecs.in_use(Component)`:

```luau
local Component = ecs.component()
local entity = ecs.entity()
ecs.in_use(Component) --> false
ecs.add(entity, Component)
ecs.in_use(Component) --> true
ecs.remove(entity, Component)
ecs.in_use(Component) --> true

Because only one component hook kind can exist per Component, it's important that hooks be used correctly. Hooks are
intended for enforcing invariants, I.e., ensuring that something is always true under certain conditions. Here's an
example of how you could use hooks:

```luau
local Player = ecs.component()
local PlayerSaveData = ecs.component()

ecs.set(Player, b2.OnAdd, function(entity)
    ecs.set(entity, PlayerSaveData, ...)
end)

## Monitors

Monitors are similar to Hooks, but with a few key differences. Only one Hook of each kind can exist per Component, and
hooks cannot be changed or removed. You can modify an entity from inside a hook. Monitors are the contrary - multiple of
them can exist, they can be added or removed at any time, and you cannot modify entities safely from inside monitors.
That all said, you can also expect monitors to be significantly slower than listening with hooks.

Another difference is that monitors allow you to broadly percieve structural changes based on queries. You can create a
new monitor with `query:monitor_added(callback)` or `query:monitor_removed(callback)`. Monitors will inform you when an
entity starts, or stops matching a query.

### `query:monitor_added<Reads...>(callback: (entity, Reads...) -> ())`

Calls when an entity has started matching the query, as well as all of the data which a query normally reads.

### `query:monitor_removed(callback: (entity) -> ())`

Calls when an entity has stopped matching the query.

## Each

Sometimes you may need to iterate through every entity which has a single component without reading its value. This can
be achieved with `ecs.each`:

```luau
local e1 = ecs.entity()
local e2 = ecs.entity()
ecs.add(e1, Name "Alice")
ecs.set(e2, Name, "Bob")

local has_name = {}
for entity in ecs.each(Name) do
    has_name[entity] = true
end

## Builtin Components

These components are properties of `b2`. User-facing builtin components include:

- Component
- Name
- Wildcard
- ChildOf
- DeleteOnClear
- DeleteOnDelete
- DeleteOnClearTarget
- DeleteOnDeleteTarget
- DeleteOnClearAsRelation
- DeleteOnDeleteAsRelation
- OnClear
- OnDelete
- OnClearTarget
- OnDeleteTarget
- CleanupDelete
- OnAdd
- OnChange
- OnRemove
- Exclusive


# Luau Language Server

An implementation of a language server for the [Luau](https://github.com/Roblox/luau) programming language.

## Getting Started

Install the extension from the VSCode Marketplace or OpenVSX Registry:

- VSCode Marketplace: <https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp>
- OpenVSX Registry: <https://open-vsx.org/extension/JohnnyMorganz/luau-lsp>

Alternatively, check out [Getting Started for Language Server Clients](https://github.com/JohnnyMorganz/luau-lsp/blob/main/editors/README.md)
to setup your own client for a different editor.

A [Nightly Release](https://github.com/JohnnyMorganz/luau-lsp/actions/workflows/nightly.yml) runs every day with the latest changes on main.
You can download the relevant release for your platform and manually install the `.vsix`.
The nightly release builds with debug symbols and profiling instrumentation for debugging.

### For General Users

The language server will start working immediately for general Luau code. There is built-in support
for Luau's generalised [require-by-string semantics](https://rfcs.luau.org/new-require-by-string-semantics.html), using `require("./module")`.

To provide global type definitions for a custom environment, specify `luau-lsp.types.definitionFiles`.
Corresponding documentation is configured using `luau-lsp.types.documentationFiles`.

If you use Luau in a different environment and are interested in using the language server, or
looking for any specific features, please get in touch!

### For Rojo Users (requires `v7.3.0+`)

By default, the latest Roblox type definitions and documentation are preloaded out of the box.
This can be disabled by configuring `luau-lsp.platform.type`.

The language server uses Rojo-style sourcemaps to resolve DataModel instance trees for intellisense.
This is done by running `rojo sourcemap --watch default.project.json --output sourcemap.json`.
The server listens to changes of a `sourcemap.json` file present at the workspace root. It is recommended to add this
file to your `.gitignore`.

The following settings are configurable for sourcemap generation:

- `luau-lsp.sourcemap.enabled`: Whether sourcemap support is enabled (default: on)
- `luau-lsp.sourcemap.autogenerate`: Whether sourcemaps are automatically generated by the client. If disabled, the server will listen to manual changes to a `sourcemap.json` file (default: on)
- `luau-lsp.sourcemap.rojoProjectFile`: What project file to use (default: `default.project.json`)
- `luau-lsp.sourcemap.includeNonScripts`: Whether to include non script instances in the sourcemap. May be disabled for expensive DataModels (default: on)
- `luau-lsp.sourcemap.sourcemapFile`: What sourcemap file to use (default: `sourcemap.json`)

If you do not use Rojo, you can still use the Luau Language Server, you just need to manually generate a `sourcemap.json`
file for your particular project layout. You can configure `luau-lsp.sourcemap.generatorCommand` to run a custom generator.
If your generator does not support file watching, enable `luau-lsp.sourcemap.useVSCodeWatcher`.

> Note: in the diagnostics type checker, the types for DataModel (DM) instances will resolve to `any`. This is a current limitation to reduce false positives.
> However, autocomplete and hover intellisense will correctly resolve the DM type.
> To enable this mode for diagnostics, set `luau-lsp.diagnostics.strictDatamodelTypes` (off by default).
> [Read more](https://github.com/JohnnyMorganz/luau-lsp/issues/83#issuecomment-1192865024).

**A companion Studio plugin is available to provide DataModel information for Instances which are not part of your Rojo build / filetree: [Plugin Marketplace](https://www.roblox.com/library/10913122509/Luau-Language-Server-Companion)**

## Standalone

The tool can run standalone, similar to [`luau-analyze`](https://github.com/JohnnyMorganz/luau-analyze-rojo), to provide type and lint warnings in CI, with full Rojo resolution and API types support.
The entry point for the analysis tool is `luau-lsp analyze`.

Install the binary and run `luau-lsp --help` for more information.

## Configuration

There are 2 types of configuration styles for the language server. General configuration is provided by `.luaurc` files,
which allow you to configure language strictness, lints, and require aliases. More information is available in Luau's [RFC documentation](https://rfcs.luau.org/config-luaurc.html).

The second configuration style is specific to the language server. See `luau-lsp` in your editor's settings for more details.

## Supported Features

- [x] Diagnostics (incl. type errors)
- [x] Autocompletion
- [x] Hover
- [x] Signature Help
- [x] Go To Definition
- [x] Go To Type Definition
- [x] Find References
- [x] Document Link
- [x] Document Symbol
- [x] Color Provider
- [x] Rename
- [x] Semantic Tokens
- [x] Inlay Hints
- [x] Documentation Comments ([Moonwave Style](https://github.com/evaera/moonwave) - supporting both `--- comment` and `--[=[ comment ]=]`, but must be next to statement)
- [x] Code Actions
- [x] Workspace Symbols
- [x] Folding Range
- [x] Call Hierarchy

The following are extra features defined in the LSP specification, but most likely do not apply to Luau or are not necessary.
They can be investigated at a later time:

- [ ] Go To Declaration (do not apply)
- [ ] Go To Implementation (do not apply)
- [ ] Code Lens (not necessary)
- [ ] Document Highlight (not necessary - editor highlighting is sufficient)
- [ ] Selection Range (not necessary - editor selection is sufficient)
- [ ] Inline Value (applies for debuggers only)
- [ ] Moniker
- [ ] Formatting (see [stylua](https://github.com/JohnnyMorganz/StyLua))
- [ ] Type Hierarchy (Luau currently does not provide any [public] ways to define type hierarchies)

## Crash Reporting

The language server implements opt-in crash reporting, using [Sentry](https://sentry.io/).

On VSCode, this is configured via the setting `luau-lsp.server.crashReporting.enabled`.
When a crash is encountered, an out-of-process crash handler will upload the crash details to Sentry via HTTP.

When a crash is reported, the report stores the following information:

- Crash reason and thread stack trace
- Device metadata: OS name, version and CPU architecture
- Dynamic libraries loaded into the process (including filesystem paths)

This information is transferred through a [Minidump](https://docs.sentry.io/platforms/native/guides/minidumps/#what-is-a-minidump) file.
This file is not stored after processing. No general usage data is recorded.

Crash Reporting is only available for Windows and macOS, and is not active for Standalone mode (`luau-lsp analyze`)

## Build From Source

Submodules are required to build the project. You should use `--recurse-submodules` when you initally clone the project; e.g.

```sh
git clone https://github.com/JohnnyMorganz/luau-lsp.git --recurse-submodules

To compile the project, execute the following commands in the project root directory.

```sh
git submodule update --init --recursive
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --target Luau.LanguageServer.CLI --config Release

You can build `Luau.LanguageServer.Test` for unit tests.
Some tests make assumptions about relative file paths.
When running tests, ensure that your current working directory is set to the root of the repository.