To Install the luppux.js
module, open a console and write the code below.
For npm
npm i luppux.js
For Yarn
yarn add luppux.js
For CommonJS
const { Luppux, YamlDatabase, JsonDatabase } = require("luppux.js");
Luppux({client:client,database:{type:YamlDatabase,databasePath:"./luppuxdb.yml"}});
For ES6
import { Luppux, YamlDatabase, JsonDatabase } from "luppux.js";
Luppux({client:client,database:{type:YamlDatabase,databasePath:"./luppuxdb.yml"}});
# Database Functions
// Docs; https://fivesobes.gitbook.io/five.db/jsondatabase
client.db.set()
client.db.has()
client.db.get() / client.db.fetch()
client.db.add()
client.db.substr()
client.db.push()
client.db.pull()
client.db.delete()
client.db.all()
client.db.findOneAndDelete()
# Prototypes
await Member.bannerURL(options) - options: {dynamic:Boolean,size:Number,format:String} // default:{format:"png",size:512}
Member.hasRole(roleId) // default:null
await User.bannerURL(options) - options: {dynamic:Boolean,size:Number,format:String} // default:{format:"png",size:512}
VoiceChannel.join(options) - options: {selfDeaf:Boolean,selfMute:Boolen} // default:{selfDeaf:false,selfMute:false}
Collection.array()
Message.delete(ms) - ms: Number // default:null
Value.splitMessage(count) - count: Number // default:null
Array.listRoles(lastMessage) - lastMessage: String // default:"and"
Array.random()
Array.last()
// member.bannerURL() or user.bannerURL()
client.on("messageCreate",async(message) => {
if(message.content.includes(".banner")){
let embed = new EmbedBuilder()
.setImage(await message.member.bannerURL({dynamic:true,size:2048}))
.setDescription(`${message.author.tag}`)
message.reply({embeds:[embed});
}
})
client.on("messageCreate",async(message) => {
if(message.content.includes(".delete") && message.member.hasRole("roleId")){
message.channel.bulkDelete(100);
}
})
client.on("ready",async() => {
let channel = client.channels.cache.get("voiceChannelId");
channel.join({selfDeaf:true,selfMute:false});
})
client.on("messageCreate",async(message) => {
if(message.content.includes("hi")){
message.reply({content:"Hi, How Are You?}).delete(5000);
}
})
let numbers = "123456789....."
let value = numbers.splitMessage(5);
for (message of value) {
console.log(message); // first returning; "12345" , second returning; "678910";
}
let arrayRoles = ["928259219038302258","852103749228036136","341592492224806914"];
console.log(arrayRoles.listRoles("ands")); // return; <@&928259219038302258>,<@&852103749228036136> ands <@&341592492224806914>
let usersId = ["928259219038302258","852103749228036136","341592492224806914"];
console.log(usersId.random()); // return; 852103749228036136
let usersId = ["928259219038302258","852103749228036136","341592492224806914"];
console.log(usersId.last()); // return; 341592492224806914
Five So Beş ⚕️ |
Lulushu ⚕️ |
Approval ⚕️ |
Luhux ⚕️ |
ertu ⚕️ |
Lethh ⚕️ |
Crane ⚕️ |
Piku ⚕️ |
Arvis ⚕️ |