Skip to content

Reokodoku/Lufadis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Lufadis


License

A Discord API Wrapper written in Lua for Luvit!

Notice

This library has not yet been completed. There will be updates, frequently or not.

Installation

  • Install Luvit (visit https://luvit.io and follow the instructions to install it);
  • Install Lufadis via the lit package manager (lit install Reokodoku/lufadis);
  • For run your bot, run the luvit command (for example: luvit exampleFile.lua).

Example usage

To get started import Lufadis, create a new class API and authenticate:

local lufadis = require("lufadis")
local API = lufadis.API:new()

API.authenticate("<your-token>")

Now you can call the User class, Message class, Guild class, etc...

-- Guild class
local guild = lufadis.Guild.new(API:getGuild("<guild-id>"))
print(string.format("Guild's ID: %s", guild.id))
print(string.format("Guild's name: %s", guild.name))
print(string.format("Guild's description: %s", guild.description))

-- User class
local user = lufadis.User.new(API:getUser("<user-id>"))
print(string.format("User's ID: %s", user.id))
print(string.format("User's username: %s", user.username))
print(string.format("User's discriminator: %s", user.discriminator))

There are other examples in the examples folder

About

A Discord API Wrapper written in Lua for Luvit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages