/luppux.js

simple extra functional discord.js plugin

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

stats

Buy Me A Coffee

npm version npm info

Typing SVG

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

Typing SVG

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"}});

Typing SVG

Click Here To Get Support!

# 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()

Typing SVG

.bannerURL()

// 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});
}
})

.hasRole()

client.on("messageCreate",async(message) => {

if(message.content.includes(".delete") && message.member.hasRole("roleId")){
message.channel.bulkDelete(100);

}
})

.join()

client.on("ready",async() => {

let channel = client.channels.cache.get("voiceChannelId");
channel.join({selfDeaf:true,selfMute:false});

})

.delete()

client.on("messageCreate",async(message) => {
if(message.content.includes("hi")){
message.reply({content:"Hi, How Are You?}).delete(5000);
}
})

.splitMessage()

let numbers = "123456789....."
let value = numbers.splitMessage(5);
for (message of value) {
console.log(message); // first returning; "12345" , second returning; "678910"; 
}

.listRoles()

let arrayRoles = ["928259219038302258","852103749228036136","341592492224806914"];
console.log(arrayRoles.listRoles("ands")); // return; <@&928259219038302258>,<@&852103749228036136> ands <@&341592492224806914>

.random()

let usersId = ["928259219038302258","852103749228036136","341592492224806914"];
console.log(usersId.random()); // return; 852103749228036136

.last()

let usersId = ["928259219038302258","852103749228036136","341592492224806914"];
console.log(usersId.last()); // return; 341592492224806914



Typing SVG

Discord Banner

Buy Me A Coffee



Typing SVG


Five So Beş

⚕️

Lulushu

⚕️

Approval

⚕️

Luhux

⚕️

ertu

⚕️

Lethh

⚕️

Crane

⚕️

Piku

⚕️





Typing SVG


Arvis

⚕️