SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js")
  2. const { prefix } = require("../config.json")
  3. const { discordLink } = require("../colors.json")
  4. const sbl = require('spacebots')
  5. module.exports.run = async (bot, message, args) => {
  6.   if (args[0] == "invite")
  7.     return message.channel.send(
  8.       "Here's your SBL invite link:\nhttps://discord.gg/n464Jvs"
  9.     )
  10.   if (message.guild.id !== "527862771014959134" && message.author !== bot.owner)
  11.     return message.reply(
  12.       `This command only works on SBL! To get an invite link please type \`${prefix}sbl invite\``
  13.     )
  14.   let bTf = message.mentions.users.first() || bot.fetchUser(args[0])
  15.   if (!bTf)
  16.     return message.channel.send(
  17.       `Sorry, ${message.author.toString()}, I couldn't find that user!`
  18.     )
  19.  
  20.   const sblBot = await sbl.getStats(bTf.id || args[0]).catch(err => {
  21.     message.channel.send(err)
  22.     if (err.message == 'Not Found') return message.channel.send('Whoops! That bot doesn\'t exist!')
  23.   })
  24.   if (!sblBot) return
  25.  
  26.   const user = await bot.fetchUser(sblBot.id)
  27.  
  28.   let oStr = "Owners"
  29.   if (sblBot.owner.length === 1) oStr = "Owner"
  30.   let cStr = bot.emojis.get("569413210118160395")
  31.   if (sblBot.certified) {
  32.     cStr = bot.emojis.get("569413187473113089")
  33.   }                    
  34.   let lStr = "lStr"
  35.   const inline = true
  36.   const sblEmbed = new Discord.RichEmbed()
  37.     .setTitle(user.tag)
  38.     .setURL(`https://space-bot-list.tk/bots/${user.id}`)
  39.     .setColor(discordLink)
  40.     .setThumbnail(user.displayAvatarURL)
  41.     .setDescription(sblBot.desc)
  42.     .addField("Name", `\`${user.username}\``, inline)
  43.     .addField("ID", user.id, inline)
  44.     .addField("Prefix", sblBot.prefix, inline)
  45.     .addField("Library", sblBot.library, inline)
  46.     .addField("Guilds", sblBot.servers ? sblBot.servers : "N/A", inline)
  47.     .addField("Certified", cStr, inline)
  48.     .addField(oStr, sblBot.owner.map(x => `<@${x}>`).join(", "), inline)
  49.     .addField("Links", links(sblBot.website, sblBot.support, sblBot.git), true)
  50.     message.channel.send(sblEmbed)
  51. }
  52. module.exports.help = {
  53.   name: `sbl`,
  54.   usage: `${prefix}sbl [@mention / ID]`,
  55.   description: "Get info about abot in SBL!",
  56.   aliases: [],
  57.   category: 'head'
  58. }
  59.  
  60. function links(website, support, git) {
  61.   let final = []
  62.   if (website != '') final.push(`[Website](${website})`)
  63.   if (support != '') final.push(`[Support](https://discord.gg/${support})`)
  64.   if (git != '') final.push(`[GitHub](https://github.com/${git})`)
  65.   return final.join(' | ')
  66. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top