DiscordLua
discorddiscord
v1.2.4
Install

CLI commands

CLI
On this page

The installer places dislua and discordlua on PATH. Both names invoke the same CLI.

dislua run <file>

Start a bot script on the embedded Lua 5.4 runtime.

Syntax

dislua run <file>

Arguments

ArgumentDescription
filePath to a Lua script, relative to the working directory.

Example

shell
dislua run bot.lua

Output

The process stays running while the Gateway session is open. Logs print to stdout.

Errors

Exits 1 if the file is missing, Lua raises, or login/network fails without being handled.

dislua init [bot.lua]

Write a starter bot.lua in the current directory.

Syntax

dislua init [bot.lua]

Arguments

ArgumentDescription
bot.luaOptional output path. Defaults to bot.lua in the current folder.

Example

shell
dislua init

Output

Creates the file and prints its path.

Errors

Exits 1 if the target already exists or the directory is not writable.

dislua version

Print runtime, CLI, and module versions.

Syntax

dislua version

Arguments

No arguments.

Example

shell
dislua version

Output

Version lines for runtime, CLI, installer, and Discord module.

Errors

Exits 0 on success.

dislua check-update

Compare the installed package to the published version manifest.

Syntax

dislua check-update

Arguments

No arguments.

Example

shell
dislua check-update

Output

Reports whether an update is available and the published version.

Errors

Exits 1 if the manifest URL cannot be fetched.

dislua update

Download DiscordLua-Setup.exe and open the launcher, or replace the runtime when the launcher is already current.

Syntax

dislua update

Arguments

No arguments.

Example

shell
dislua update

Output

If the launcher is below 1.1.0, downloads Setup and opens the GUI. Otherwise downloads the runtime when a newer package is published.

Errors

Exits 1 if the checksum mismatches, HTTPS is unavailable, or Setup cannot be started. Close bots first.

dislua doctor

Print install paths and check Lua, JSON, network, and crypto.

Syntax

dislua doctor

Arguments

No arguments.

Example

shell
dislua doctor

Output

EXE path, install root, module path, and a pass/fail line for each check.

Errors

Exits 1 if a required check fails.

dislua help

Show CLI usage.

Syntax

dislua help

Arguments

No arguments.

Example

shell
dislua help

Output

Command list and short descriptions. discordlua is an alias of dislua.

Errors

Exits 0.

dislua audit

Run the in-tree compatibility audit script. Source checkout only.

Syntax

dislua audit

Arguments

No arguments.

Example

shell
dislua audit

Output

Audit results for the DiscordLua module surface.

Errors

Exits 1 if the audit script is not present (installed packages) or the audit fails.

Exit codes

0 success. 1 runtime, config, or network failure. Errors print a structured message with module and function.

Search Ctrl K Navigate Open Esc