Skip to content
Bilal Bassam edited this page Feb 4, 2022 · 4 revisions

To write a Discordia application, the library's main module must be required. If it's in a deps or libs folder, simply require it by name. If you've manually installed the library elsewhere, then you will need to provide a relative or full path to the Discordia directory.

local discordia = require('discordia')

The Discordia module has every module and class constructor that is intended to be publicly available:

Classes

Discordia has many custom classes. Some of them are instantiated only by the library and not by users. The classes that may be safely instantiated by users are included in the Discordia module:

Sub-Modules

In addition to classes, the Discordia module has some generic modules that may be helpful in writing your applications.

class

Used to create custom classes and provides tools for inspecting classes and class instances.

See the Classes page for more information.

enums

Used to create custom enumerations or access a variety of pre-defined enumerations.

See the Enumerations page for more information.

extensions

Extensions to the Lua standard library. Functions can be used directly or can be loaded into the Lua global tables. See Extensions for more information.

package

Not to be confused with the global Lua module, this Discordia's literal package metadata, used to define the module when it is uploaded to lit, the Luvit Invention Toolkit.

storage

An empty table that can be used to store user data. This may be used an alternative to storing values on class instances or in global variables, both of which are not recommended.

Clone this wiki locally