·
Report Bug
·
Request Feature
This is a library for interacting with the Discord API in an object-oriented fashion. It is very fresh and still lacking some features, but has proven useful for my personal cases. For the time being, most things are read-only, however this will change.
Simply download the Latest Release, place into your resources directory and start!
- You will need knowledge on how to create/add a discord bot to your server. Guide
- Set a new key in your
server.cfg
ofluacord_token
along with starting luacord after. See example below
... (otherconfig)
set luacord_token="abcdefg123"
... (other resources)
ensure luacord
The resource alone does nothing. It is a library to be included with another resource to interact with discord. For example:
--- fxmanifest.lua
server_scripts {
'@luacord/server/server.lua',
'server/server.lua'
}
--- server/server.lua
local discord_client = LuaCord.new()
local guild = Guild.new(discord_client, "YOUR_GUILD_ID")
--- you'll have to get player's discord identifier without the 'discord:'
local memberId = "MEMBER ID FROM SOMETHING"
guild:GetMember(memberId, function(member)
print('Member Stuff', json.encode(member.User))
end)
- Provide Promise based API to avoid callback disaster
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'chore: added some amazing feature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Cyntaax - @cyntaax - cyntaax@gmail.com
Project Link: https://github.com/cyntaax/luacord