skylex
v0.0.1
Published
Botlarınızda Rahatlıkla Kullanabileceğiniz Bir Modüldür.
Downloads
8
Maintainers
Readme
Skylex
Yükleme
npm i skylex
Ekonomi Kod:
const { Client } = require('discord.js');
const { Economy } = require('skylex');
const client = new Client();
const eco = new Economy();
client.eco = eco;
client.on('ready', async () => {
console.log('ready');
});
client.on('message', async (message) => {
if (!message.guild) return;
var args = message.content.split(" ");
if (args[0] == "!daily") {
client.eco.daily(message.author.id, message.guild.id, message);
} else if (args[0] == "!money") {
client.eco.fetchMoney(message.author.id, message.guild.id, message);
} else if (args[0] == "!addMoney") {
var mone = args[1];
if (!args[1]) mone = "1";
client.eco.addMoney(message.author.id, message.guild.id, message, mone);
} else if (args[0] == "!delMoney") {
var mone = args[1];
if (!args[1]) mone = "1";
client.eco.delMoney(message.author.id, message.guild.id, message, mone);
} else if (args[0] == "!leaderboard") {
client.eco.leaderboard(message.guild.id, message, 10);
}
});
client.login('token');
bot
Music kod:
const { Client } = require('discord.js');
const { Music } = require('skylex');
const client = new Client();
client._music = new Music(client, 'mongoURL');
require('discord-buttons')(client);
client.on('ready', async () => console.log('ready'));
client.on('message', async (message) => {
var args = message.content.split(" ");
if (args[0] == "!pl") {
var msc = args.slice(1).join(" ");
if (!msc) return message.channel.send("Music!");
client._music.oynat(message, msc);
} else if (args[0] == "!!kur") {
client._music.kur(message);
};
});
client.on('clickButton', async (button) => {
client._music.buton(button);
});
client.login("token");
e)