For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bot Search

By using this method, you can get information about your bot as well as other bots.

An Example Command

const Discord = require("discord.js"); //This is an example bot search command
const client = new Discord.Client();
const cybralist = require("cybralist.js");
const dbl = new cybralist("TOKEN-HERE", client); // This is not your bot token, this token can be found from our website: https://cybralist.com/bots/your_bot_id

client.on("ready", async () => {
  console.log(`Logged in as ${client.user.tag}`)
})

client.on("message", async (message) => {
  if (!message.guild) return;
  if (message.author.bot) return;
  
  const prefix = "!";
  const args = message.content.slice(prefix.length).split(" ");
  const command = args.shift().toLowerCase();
    
  if (command === "search") {

	try {
		const query = args.join(" "); // search query must be a bot id
		
		if (!query) return message.channel.send(`Please provide a bot id which is added in cybralist.com`);
		const botinfo = await dbl.search(`${query}`);
		
		const embed = new Discord.MessageEmbed()
		.setTitle(`${botinfo.username} || Info`)
		.setFooter(`Requested by ${message.author.username}`, message.author.displayAvatarURL({ dynamic: true }))
		.setColor(`BLURPLE`)
		.setThumbnail(botinfo.avatar)
		.setDescription(`**Name:** ${botinfo.username}#${botinfo.discrim}\n**ID:** ${botinfo.botID}\n**Avatar:** [\`Click here\`](${botinfo.avatar})\n**Prefix:** ${botinfo.prefix}\n**Owner:** <@${botinfo.ownerID}> (${botinfo.owner})\n**Co-onwers:** ${botinfo.coowners.join(", ")}\n**Tags:** ${botinfo.tags.join(", ")}\n**Verified: **${botinfo.certificate}\n**GitHub: **[\`Click here\`](${botinfo.github})\n**Support Server:** [\`Click here\`](${botinfo.support})\n**Votes:** ${botinfo.votes}\n**Website:** [\`Click here\`](${botinfo.website})`)
		.addField(`Short Description`, `${botinfo.shortDesc}`)
		//.addField(`Long Description`, ${botinfo.longDesc}) //Adding long description might give you a error beacuse the embed can't handle long fields (6000)
		.setTimestamp();
		
		message.channel.send(embed).catch(err => {
				message.channel.send(`**Error:** ${err}`) // If the given id was wrong or the api got any issues, then it will return this error
		});
    } catch (e) {
	  message.channel.send(`I was unable to find the search results!`)

  }
  }

})

client.login(process.env.token)

Last updated