Skip to content

Discord bot in lua, using function env injection and modules.

License

Notifications You must be signed in to change notification settings

j2ghz/discordbot-lua

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discordbot-lua

Running

Assuming you have luvit installed, run lit install to install dependencies.

The token environment variable is used for authentication.

You can use a script like the below powershell to easily start the bot.

cd src
$env:token = "[TOKEN HERE]"
luvit ./main.lua
Remove-Item -Path env:token
cd ..

Use the shutdown command to shutdown the bot. DO NOT terminate the process or, in a terminal, use Ctrl+C. Improper shutdown of the bot can and will likely cause to loss of data.

Configuration

You can change the constants at the beginning of src/main.lua.

You can temporarily disable modules by adding do return false end at the start of the file.

Development

Run emmy/gen.lua to generate EmmyLua annotations for discordia.

About

Discord bot in lua, using function env injection and modules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Lua 99.0%
  • Dockerfile 1.0%