BotMine›Developer Docs›Lua SDK Basics
Lua Addon SDK
Lua SDK Basics
Overview of the global APIs and fixed type values in the BotMine Lua SDK.
Overview
The BotMine Lua SDK provides safe global APIs so addons can use Discord functionality without direct unsafe runtime access.
Available globals:
discord: Discord API wrapper, events, slash commands, messages, components, guild and member actionsconfig: addon configurationlogger: loggingjson: JSON encode and decodescheduler: timers and recurring tasks
First example
luadiscord.onReady(function(event) logger.info("Addon started as " .. event.botName) end) discord.slashCommand("ping", "Replies with Pong", function(event) event.reply("Pong!") end)
Fixed type values
Many SDK methods expect fixed string values. These values are case-sensitive.
Channel types:
TEXTVOICECATEGORYNEWSSTAGEFORUMTHREAD_PUBLICTHREAD_PRIVATETHREAD_NEWS
Button styles:
PRIMARYSECONDARYSUCCESSDANGERLINK
Text input styles:
SHORTPARAGRAPH
Activity types:
PLAYINGWATCHINGLISTENINGSTREAMINGCOMPETING
Online status:
ONLINEIDLEDO_NOT_DISTURBINVISIBLEOFFLINE
Thread auto archive duration:
601440432010080