Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Latest commit

 

History

History
67 lines (42 loc) · 990 Bytes

SCRIPT_DOCS.md

File metadata and controls

67 lines (42 loc) · 990 Bytes

Akatsuki Lua Scripts

Script are made using the language Lua, it runs in a sandbox with limited resources so things like endless while loops aren't possible.

Libraries

Discord

discord.add_role(member, role)

Returns nil

Add a role to a member.

discord.add_role("yuwui", "awoo")

discord.remove_role(member, role)

Returns nil

Remove a role from a member.

discord.remove_role("yuwui", "owner")

discord.get_user(user)

Returns { username, discriminator, avatar_url, nick, mention, owner, id }

Gets info on a user.

local user = discord.get_user "yuwui"

Context

ctx.user

Returns { username, discriminator, avatar_url, nick, mention, owner, id }

if ctx.user.username == "yuwui" then
    ctx.send "hello master"
end

ctx.args

Returns ["...","...",...]

if ctx.args[1] == "meme" then
    ctx.send "oof"
end

ctx.send(text)

Returns nil

ctx.send "hello world!"