Skip to content

Latest commit

History

History
39 lines (25 loc) 路 1.16 KB

README.md

File metadata and controls

39 lines (25 loc) 路 1.16 KB

Discord IPC

This library created a IPC connection with Discord to change the activity of your Lua project.
By the way, you should read the code!


Usage

Clone the repository and copy lua/deps/discord to your project's folder.

  • git clone https://github.com/pandasoli/discord-ipc.git
  • cp lua/deps/discord <your-project>

If you want it to show logs, well, you'll have to read the code to discover how it makes logs.

Functions

---@param client_id string
---@param logger? Logger
function Discord:setup(client_id, logger) end

---@param activity Activity?
---@param callback? fun(response: string?, err_name: string?, err_msg: string?)
function Discord:set_activity(activity, callback) end

function Discord:disconnect() end

Development

I relied a lot on the script that the plugin presence.nvim uses.