mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-23 05:34:58 +05:00
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
|
const Command = require("../../base/Command.js"),
|
||
|
Discord = require("discord.js");
|
||
|
|
||
|
class Invite extends Command {
|
||
|
constructor(client) {
|
||
|
super(client, {
|
||
|
name: "invite",
|
||
|
dirname: __dirname,
|
||
|
enabled: false,
|
||
|
guildOnly: false,
|
||
|
aliases: ["i", "add", "vote"],
|
||
|
memberPermissions: [],
|
||
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||
|
nsfw: false,
|
||
|
ownerOnly: false,
|
||
|
cooldown: 1000
|
||
|
});
|
||
|
}
|
||
|
|
||
|
async run(message, args, data) {
|
||
|
const inviteLink = `https://discordapp.com/oauth2/authorize?client_id=${this.client.user.id}&scope=bot&permissions=8`;
|
||
|
const voteURL = `https://discordbots.org/bot/${this.client.user.id}/vote`;
|
||
|
const supportURL = await this.client.functions.supportLink(this.client);
|
||
|
|
||
|
if (args[0] && args[0] === "copy") return message.channel.send(inviteLink);
|
||
|
|
||
|
const embed = new Discord.MessageEmbed()
|
||
|
.setAuthor(message.translate("general/invite:LINKS"))
|
||
|
.setDescription(message.translate("general/invite:TIP", {
|
||
|
prefix: data.guild.prefix || ""
|
||
|
}))
|
||
|
.addField(message.translate("general/invite:ADD"), inviteLink)
|
||
|
.addField(message.translate("general/invite:VOTE"), voteURL)
|
||
|
.addField(message.translate("general/invite:SUPPORT"), supportURL)
|
||
|
.setColor(data.config.embed.color)
|
||
|
.setFooter(data.config.embed.footer);
|
||
|
|
||
|
message.channel.send(embed);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports = Invite;
|