search/
Start typing to search packages!
package_2
discord-luau-fork
By @horsenuggets
Roblox
Mirroreddiscord-luau-fork
A Luau library for creating Discord bots, powered by Lune.
Documentation
Full API documentation is available at horsenuggets.github.io/discord-luau-fork-docs.
Installation
Add to your wally.toml:
[dependencies]
Discord = "horsenuggets/discord-luau-fork@1.0.13"
Quick Start
local Discord = require("@packages/Discord")
local process = require("@lune/process")
-- Load environment variables
local Dotenv = require("@devpackages/Dotenv")
Dotenv.load()
local bot = Discord.bot.new({
token = process.env.DISCORD_BOT_TOKEN,
intents = 513, -- Guild, GuildMessages
})
bot:connectAsync():await()
print(`Bot connected as {bot.user.username}`)
Features
- Full Discord Gateway support with automatic reconnection
- REST API client for all Discord endpoints
- Slash commands and interactions
- Message components (buttons, select menus, modals)
- Lavalink audio support for voice functionality
Lavalink Audio
This fork includes built-in Lavalink support for Discord voice functionality:
local Discord = require("@packages/Discord")
local Lavalink = Discord.Lavalink
local bot = Discord.bot.new({ ... })
local lavalink = Lavalink.new(bot)
-- Add a Lavalink node
lavalink:AddNode({
name = "main",
host = "localhost",
port = 2333,
password = "lifeisroblox",
})
-- Get a player for a guild and play music
local player = lavalink:GetPlayer(guildId)
player:Connect(voiceChannelId)
local result = lavalink:Search("never gonna give you up")
if result.loadType == "search" then
player:Play(result.data[1])
end
Note: Lavalink WebSocket connections require a Lune build with WebSocket headers support.
Development
- Clone the repository
- Copy
.env.templateto.envand fill in your bot token - Run
rokit installto install tools - Run
wally installto install dependencies - Run
lune run Scripts/RunTests.luauto run tests
Credits
This is a fork of the original discord-luau project by 4x8Matrix. Special thanks to the original contributors.
License
MIT
Package Details
Install command (Click to copy)
Version
1.0.13
License
MIT
Safe for commercial use
Automated license review — not legal advice.
