Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js")
- const { prefix } = require("../config.json")
- const { discordLink } = require("../colors.json")
- const sbl = require('spacebots')
- module.exports.run = async (bot, message, args) => {
- if (args[0] == "invite")
- return message.channel.send(
- "Here's your SBL invite link:\nhttps://discord.gg/n464Jvs"
- )
- if (message.guild.id !== "527862771014959134" && message.author !== bot.owner)
- return message.reply(
- `This command only works on SBL! To get an invite link please type \`${prefix}sbl invite\``
- )
- let bTf = message.mentions.users.first() || bot.fetchUser(args[0])
- if (!bTf)
- return message.channel.send(
- `Sorry, ${message.author.toString()}, I couldn't find that user!`
- )
- const sblBot = await sbl.getStats(bTf.id || args[0]).catch(err => {
- message.channel.send(err)
- if (err.message == 'Not Found') return message.channel.send('Whoops! That bot doesn\'t exist!')
- })
- if (!sblBot) return
- const user = await bot.fetchUser(sblBot.id)
- let oStr = "Owners"
- if (sblBot.owner.length === 1) oStr = "Owner"
- let cStr = bot.emojis.get("569413210118160395")
- if (sblBot.certified) {
- cStr = bot.emojis.get("569413187473113089")
- }
- let lStr = "lStr"
- const inline = true
- const sblEmbed = new Discord.RichEmbed()
- .setTitle(user.tag)
- .setURL(`https://space-bot-list.tk/bots/${user.id}`)
- .setColor(discordLink)
- .setThumbnail(user.displayAvatarURL)
- .setDescription(sblBot.desc)
- .addField("Name", `\`${user.username}\``, inline)
- .addField("ID", user.id, inline)
- .addField("Prefix", sblBot.prefix, inline)
- .addField("Library", sblBot.library, inline)
- .addField("Guilds", sblBot.servers ? sblBot.servers : "N/A", inline)
- .addField("Certified", cStr, inline)
- .addField(oStr, sblBot.owner.map(x => `<@${x}>`).join(", "), inline)
- .addField("Links", links(sblBot.website, sblBot.support, sblBot.git), true)
- message.channel.send(sblEmbed)
- }
- module.exports.help = {
- name: `sbl`,
- usage: `${prefix}sbl [@mention / ID]`,
- description: "Get info about abot in SBL!",
- aliases: [],
- category: 'head'
- }
- function links(website, support, git) {
- let final = []
- if (website != '') final.push(`[Website](${website})`)
- if (support != '') final.push(`[Support](https://discord.gg/${support})`)
- if (git != '') final.push(`[GitHub](https://github.com/${git})`)
- return final.join(' | ')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement