Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Flare

A fully-featured Lavalink client library for Lua that works seamlessly with Discordia.

NOTE

This client library is in heavy development and will change drastically. Please do not use this production until all bugs have been worked out.

Installation

To install this library, you must use the lit package manager as follows:

lit install cloudwithax/flare

Example

Heres a quick example:

localdiscordia=require('discordia')
localflare=require('flare')
localPool=flare.PoollocalPlayer=flare.PlayerlocalNode=flare.Nodelocalclient=discordia.Client()
localnode= {
host='127.0.0.1',
port=2333,
password='youshallnotpass',
identifier='mynode'
}
client:on('ready', function()
Pool():create_node(client, node)
print('Logged in as ' ..client.user.username)
end)
client:on('messageCreate', function(message)
-- handle your commands hereifcommand=='join' thenlocalplayer=Node:create_player(vc)
elseifcommand=='play' thenlocalplayer=Node:get_player(guildid)
localtracks=player:get_tracks(query)
localtrack=tracks[1]
player:play(track)
elseifcommand=='leave' thenlocalplayer=Node:get_player(guildid)
player:disconnect()
endend)
client:run('Bot <your token here>')

About

A fully-featured Lavalink client library for Lua that works seamlessly with Discordia.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages