Skip to main content

Aloha

Support Server Documentation Pesde

Aloha is a Discord API library written in Luau using Lune. This is an attempt to make a more up-to-date form of Discordia for people who want to make Discord bots in Luau.

Current Features:

  • Event connection system that allows you to listen in on Discord events with ease.
local Aloha = require("Aloha")
local Client = Aloha.Lib.Client

Client.On("MESSAGE_CREATE", function(message)
print(message.content) -- Messages are automatically parsed into a Lua table, and abstracted to make accessing the channel, guild, etc, easier!

message:Reply("Hello!")
end)
  • A fully fledged type file for all of Discord's objects, so you don't have to check the docs!
  • Enums for all those pesky numbers and constants from Discord.
  • A secure and efficient WebSocket connection that automatically reconnects on failure.
  • A built-in Luau evaluator for your convenience, sandboxed and safe for anyone to use!
  • A janitor clone for cleaning up your connections.
  • Built-in rate limiting.
  • Shard management that scales with your bot.

Getting started:

Running Aloha is incredibly simple. Simply call the Run function with your bot token and it will handle the rest.

local Aloha = require("Aloha")
local Enum = Aloha.Lib.Enum
-- DO NOT SHARE YOUR BOT TOKEN WITH ANYONE!
Aloha.Run("YOUR_BOT_TOKEN", Enum.INTENTS.DEFAULT) -- Run takes an optional second argument for intents.

Then run the file with lune run <your_bot_file>.luau and you're good to go!