DiscordLua
discorddiscord
v1.2.4
Install

CLI

CLI
On this page

dislua runs Lua scripts, scaffolds a starter bot, reports versions, and updates the installed package.

Installation

Install with DiscordLua-Setup.exe, then open a new terminal so dislua is on PATH. Confirm with dislua version.

Commands

Full syntax, arguments, output, and errors live on the commands page.

Configuration

Environment variables the CLI and runtime read. See also the configuration page.

VariablePurpose
DISCORD_TOKENBot token for client:login and shard children.
MYLUA_MODULE_PATHOverride on-disk module root. Disk modules win over the embedded copies.
MYLUA_LOGLog level (debug, info, and other native levels).
DISCORDLUA_UPDATE_APIOverride the version manifest URL.
DISCORDLUA_SHARD_ID / DISCORDLUA_SHARD_COUNTIdentify shard fields for child processes.

Updating

The CLI reads the published version manifest, compares latest to the installed package, and downloads download_url when newer. SHA-256 must match.

shell
dislua check-update
dislua update

If the installed CLI cannot download the update, run DiscordLua-Setup.exe instead.

Troubleshooting

  • dislua doctor prints EXE, install, and module paths.
  • If require("discord") fails, set MYLUA_MODULE_PATH or re-run setup so modules are extracted next to the install root.
  • Updates require HTTPS (or localhost) download URLs.
  • Close running bots before dislua update replaces the EXE.
Search Ctrl K Navigate Open Esc