2022-01-13 00:56:24 +05:00
|
|
|
const Command = require("../../base/Command"),
|
2022-01-04 02:18:28 +05:00
|
|
|
Discord = require("discord.js");
|
|
|
|
|
|
|
|
class Invite extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: "invite",
|
|
|
|
dirname: __dirname,
|
2022-02-05 21:58:30 +05:00
|
|
|
enabled: true,
|
2022-01-04 02:18:28 +05:00
|
|
|
guildOnly: false,
|
|
|
|
aliases: ["i", "add", "vote"],
|
|
|
|
memberPermissions: [],
|
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
|
|
|
cooldown: 1000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async run(message, args, data) {
|
2022-01-05 00:24:57 +05:00
|
|
|
const inviteLink = this.client.generateInvite({
|
|
|
|
scopes: ["bot"],
|
|
|
|
permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR]
|
|
|
|
});
|
2022-02-05 21:58:30 +05:00
|
|
|
const donateLink = "https://qiwi.com/n/JONNYBRO/";
|
|
|
|
// const voteURL = `https://discordbots.org/bot/${this.client.user.id}/vote`;
|
2022-01-04 02:18:28 +05:00
|
|
|
|
2022-02-05 21:58:30 +05:00
|
|
|
if (args[0] && args[0] === "copy") return message.reply({
|
2022-01-05 00:24:57 +05:00
|
|
|
content: inviteLink
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
|
|
const embed = new Discord.MessageEmbed()
|
2022-01-05 00:24:57 +05:00
|
|
|
.setAuthor({
|
|
|
|
name: message.translate("general/invite:LINKS")
|
|
|
|
})
|
2022-01-04 02:18:28 +05:00
|
|
|
.setDescription(message.translate("general/invite:TIP", {
|
|
|
|
prefix: data.guild.prefix || ""
|
|
|
|
}))
|
2022-02-05 22:05:10 +05:00
|
|
|
.addField(message.translate("general/invite:ADD"), message.translate("general/invite:CLICK", {
|
|
|
|
link: inviteLink
|
|
|
|
}))
|
|
|
|
.addField(message.translate("general/invite:SUPPORT"), message.translate("general/invite:CLICK", {
|
|
|
|
link: donateLink
|
|
|
|
}) + `\n*для других способов пишите в ЛС <@${data.config.owner.id}>*`)
|
2022-02-05 21:58:30 +05:00
|
|
|
// .addField(message.translate("general/invite:VOTE"), voteURL)
|
2022-01-04 02:18:28 +05:00
|
|
|
.setColor(data.config.embed.color)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: data.config.embed.footer
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
|
2022-01-05 00:24:57 +05:00
|
|
|
message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
}
|
2022-01-13 00:26:23 +05:00
|
|
|
}
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
|
|
module.exports = Invite;
|