Hey! Right here’s one other lib which can or will not be helpful. I’ve been utilizing it for some private tasks and figured why not polish it up some and go public. It’s nonetheless very recent and lacking a bit, however works for what I wanted it to on the time. Positively anticipate extra.

I’ll be including extra examples sooner or later, nevertheless, it must be self-documenting for essentially the most half so long as you aren’t a kind of those who “develops” with Notepad++

About The Project

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.

Getting Started

Simply download the Latest Release, place into your sources listing and begin!

Prerequisites

Configuration

  • Set a new key in your server.cfg of luacord_token along with starting luacord after. See example below
... (otherconfig)
set luacord_token="abcdefg123"

... (other resources)
ensure luacord

Usage

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)



Looking for paid scripts? Click here