1.0.8 • Published 3 years ago
healdbot v1.0.8
npm i healdbot
Define Module & Client
const Discord = require("discord.js");
const client = new Discord.Client();
const healdbot = require("healdbot");
const votes = new healdbot("TOKEN-HERE", client);
client.login("TOKEN");
Server Count & Shard Count Posting
client.on("ready", async () => {
votes.serverCount();
/*
Invia ai server di Heald Bot i servers in cui si trova il bot.
*/
});
Vote Checking
//hasVote in manutenzione!
let hasVote = await votes.hasVoted(""); // -> user ID
if(hasVote === true) {
console.log("Questo utente ha votato il tuo bot.")
} else {
console.log("Questo utente non ha votato il tuo bot.")
}
// -> Vote info
//hasVote in manutenzione!
let botFind = await votes.search("");
console.log(botFind.username)
Embed info
// Puoi creare anche dei embed dove esce tutte le info di healdbot come quanti voti ha il tuo bot
client.on('message', async message => {
if (message.content.startsWith(`${prefix}healdbot`)) {
const args = message.content.trim().split(/ +/g);
if(!args[1]) {
const id = new Discord.MessageEmbed()
.setTitle("Metti id di un bot che si trova su heald bot")
.setColor("RED")
return message.channel.send(id)
}
let serverheald = await votes.search(`${args[1]}`);
const infohealdbot = new Discord.MessageEmbed()
.setTitle(`Info di ${serverheald.username} su heald bot`)
.setDescription(`Bot name: ${serverheald.username} \n voti su healdbot: ${serverheald.votes} \n i tag del bot: ${serverheald.tags} \n propretario del bot: <@${serverheald.ownerID}> \n Sito del bot: ${serverheald.website}`)
.setImage(serverheald.avatar)
.setColor("RANDOM")
message.channel.send(infohealdbot)
}
});
// qui sotto trovi tutte le funzioni che puoi mettere dopo serverheald.
Tutte le funzioni dopo serverheald.
// avatar
// botID
// username
// discrim
// shortDesc
// prefix
// votes
// ownerID
// coowner
// tags
// logDesc
// certificate
// support
// website
// github