mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
Система нахуй не нужна
This commit is contained in:
parent
dc8976f890
commit
f5236a04e6
17 changed files with 4 additions and 108 deletions
|
@ -8,7 +8,7 @@ class Invite extends Command {
|
|||
dirname: __dirname,
|
||||
enabled: true,
|
||||
guildOnly: false,
|
||||
aliases: ["i", "add", "vote"],
|
||||
aliases: ["i"],
|
||||
memberPermissions: [],
|
||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||||
nsfw: false,
|
||||
|
@ -23,7 +23,6 @@ class Invite extends Command {
|
|||
permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR]
|
||||
});
|
||||
const donateLink = "https://qiwi.com/n/JONNYBRO/";
|
||||
// const voteURL = `https://discordbots.org/bot/${this.client.user.id}/vote`;
|
||||
|
||||
if (args[0] && args[0] === "copy") return message.reply({
|
||||
content: inviteLink
|
||||
|
@ -42,7 +41,6 @@ class Invite extends Command {
|
|||
.addField(message.translate("general/invite:SUPPORT"), message.translate("general/invite:CLICK", {
|
||||
link: donateLink
|
||||
}) + `\n*для других способов пишите в ЛС <@${data.config.owner.id}> (указывайте ваш Discord тэг чтобы я мог выдать вам ачивку)*`)
|
||||
// .addField(message.translate("general/invite:VOTE"), voteURL)
|
||||
.setColor(data.config.embed.color)
|
||||
.setFooter({
|
||||
text: data.config.embed.footer
|
||||
|
|
|
@ -86,25 +86,6 @@ class Userinfo extends Command {
|
|||
}) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ")));
|
||||
}
|
||||
|
||||
if (user.bot && data.config.apiKeys.dbl && (data.config.apiKeys.dbl !== "")) {
|
||||
const res = await fetch("https://discordbots.org/api/bots/" + user.id, {
|
||||
headers: {
|
||||
"Authorization": data.config.apiKeys.dbl
|
||||
}
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!data.error) {
|
||||
embed.addField(this.client.customEmojis.desc + " " + message.translate("common:DESCRIPTION"), data.shortdesc, true)
|
||||
.addField(this.client.customEmojis.stats + " " + message.translate("common:STATS"), message.translate("general/userinfo:BOT_STATS", {
|
||||
votes: data.monthlyPoints || 0,
|
||||
servers: data.server_count || 0,
|
||||
shards: (data.shards || [0]).length,
|
||||
lib: data.lib || "unknown"
|
||||
}), true)
|
||||
.addField(this.client.customEmojis.link + " " + message.translate("common:LINKS"), `${data.support ? `[${message.translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${message.translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${message.translate("common:WEBSITE")}](${data.website})` : ""}`, true);
|
||||
}
|
||||
}
|
||||
|
||||
message.reply({
|
||||
embeds: [embed]
|
||||
});
|
||||
|
|
|
@ -28,18 +28,10 @@ module.exports = {
|
|||
id: "XXXXXXXXXXX", // The ID of the bot's owner
|
||||
name: "@XXXXXXXXXXX#1234" // And the name of the bot's owner
|
||||
},
|
||||
/* DBL votes webhook (optional) */
|
||||
votes: {
|
||||
port: 5000, // The port for the server
|
||||
password: "XXXXXXXXXXX", // The webhook auth that you have defined on discordbots.org
|
||||
channel: "XXXXXXXXXXX" // The ID of the channel that in you want the votes logs
|
||||
},
|
||||
/* The API keys that are required for certain commands */
|
||||
apiKeys: {
|
||||
// BLAGUE.XYZ: https://blague.xyz/
|
||||
blagueXYZ: "XXXXXXXXXXX",
|
||||
// DBL: https://discordbots.org/api/docs#mybots
|
||||
dbl: "XXXXXXXXXXX",
|
||||
// AMETHYSTE: https://api.amethyste.moe
|
||||
amethyste: "XXXXXXXXXXX"
|
||||
},
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"link": "<:atlanta_link:598176933855100976>",
|
||||
"voice": "<:atlanta_voice:598176518891372560>",
|
||||
"add": "<:atlanta_add:598176235700355083>",
|
||||
"vote": "<:atlanta_vote:598175768274665492>",
|
||||
"help": "<:atlanta_help:598175335078559771>",
|
||||
"warn": "<:atlanta_warn:598179558927106058>",
|
||||
"error": "<:atlanta_error:736144198318686278>",
|
||||
|
|
|
@ -24,10 +24,6 @@ module.exports = class {
|
|||
const birthdays = require("../helpers/birthdays");
|
||||
birthdays.init(client);
|
||||
|
||||
// DiscordBots.org STATS
|
||||
const discordbotsorg = require("../helpers/discordbots.org");
|
||||
discordbotsorg.init(client);
|
||||
|
||||
// Unmute users
|
||||
const checkUnmutes = require("../helpers/checkUnmutes");
|
||||
checkUnmutes.init(client);
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
const DBL = require("dblapi.js");
|
||||
|
||||
/* THIS POSTS STATS TO DISCORDBOTS.ORG */
|
||||
module.exports = {
|
||||
/**
|
||||
* Starts to post stats to DBL
|
||||
* @param {object} client The Discord Client instance
|
||||
*/
|
||||
init(client) {
|
||||
if (client.config.apiKeys.dbl && client.config.apiKeys.dbl !== "") {
|
||||
const stats = new DBL(client.config.apiKeys.dbl, client);
|
||||
setInterval(function () {
|
||||
stats.postStats(client.guilds.cache.size);
|
||||
}, 10 * 60000); // every 10 minutes
|
||||
const dbl = new DBL(client.config.apiKeys.dbl, {
|
||||
webhookPort: client.config.votes.port,
|
||||
webhookAuth: client.config.votes.password
|
||||
});
|
||||
dbl.webhook.on("vote", async (vote) => {
|
||||
const dUser = await client.users.fetch(vote.user);
|
||||
const member = await client.findOrCreateMember({
|
||||
id: vote.user,
|
||||
guildID: client.config.support.id
|
||||
});
|
||||
member.money = member.money + 50;
|
||||
member.save();
|
||||
dUser.send(client.translate("misc:VOTE_DM", {
|
||||
user: dUser.tag
|
||||
})).catch(() => {});
|
||||
const logsChannel = client.channels.cache.get(client.config.votes.channel);
|
||||
|
||||
if (logsChannel) logsChannel.send({
|
||||
content: client.translate("misc:VOTE_LOGS", {
|
||||
userid: dUser.id,
|
||||
usertag: dUser.tag
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
|
@ -6,6 +6,5 @@
|
|||
"CLICK": "[**Click**]({{link}})",
|
||||
"TIP": "Send `{{prefix}}invite copy` to be able to copy the invite link!",
|
||||
"ADD": "Invite JaBa",
|
||||
"VOTE": "Vote for JaBa",
|
||||
"SUPPORT": "Support developer"
|
||||
}
|
|
@ -6,6 +6,5 @@
|
|||
"NO_GAME": "Not playing",
|
||||
"NO_ROLE": "No role",
|
||||
"NO_NICKNAME": "No nickname",
|
||||
"MORE_ROLES": "and {{count}} others roles",
|
||||
"BOT_STATS": "**{{votes}}** votes ([top.gg](https://top.gg))\n**{{servers}}** servers\n**{{shards}}** shards\nUsing **{{lib}}**"
|
||||
"MORE_ROLES": "and {{count}} others roles"
|
||||
}
|
|
@ -14,8 +14,6 @@
|
|||
"NO_PERMS": "You must have an administration rights to perform this action!",
|
||||
"NO_REASON_PROVIDED": "No reason provided",
|
||||
"NO_USER_FOUND_ID": "No user on Discord has the ID `{{id}}`!",
|
||||
"VOTE_DM": "⬆️ Hello {{user}}, thanks for voting!\nHere's your reward: 40 credits (on the support server)!",
|
||||
"VOTE_LOGS": "⬆️ **{{usertag}}** (`{{userid}}`) voted for **JaBa** and won **40** credits, thank you!\n<https://discordbots.org/bot/557445719892688897/vote>",
|
||||
"HELLO_SERVER": "Hello **{{username}}**, my prefix on this server is `{{prefix}}`. Use `{{prefix}}help` to get the list of the commands!",
|
||||
"HELLO_DM": "Hello, as you are currently in direct message you don't need to add a prefix before command name.",
|
||||
"GUILD_ONLY": "This command is only available on a server!",
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
"DESCRIPTION": "Stop the music",
|
||||
"USAGE": "{{prefix}}stop",
|
||||
"EXAMPLES": "{{prefix}}stop",
|
||||
"VOTE_CONTENT": "React with 👍 to stop the music! {{requiredCount}} more votes are required.",
|
||||
"SUCCESS": "Music stopped!"
|
||||
}
|
|
@ -6,6 +6,5 @@
|
|||
"CLICK": "[**Тык**]({{link}})",
|
||||
"TIP": "Отправьте `{{prefix}}invite copy`, чтобы получить ссылку для копирования!",
|
||||
"ADD": "Пригласить JaBa",
|
||||
"VOTE": "Проголосовать за JaBa",
|
||||
"SUPPORT": "Поддержать разработчика"
|
||||
}
|
|
@ -7,6 +7,5 @@
|
|||
"NO_ROLE": "Нет роли",
|
||||
"ROLE": "Высшая роль",
|
||||
"NO_NICKNAME": "Нет никнейма",
|
||||
"MORE_ROLES": "и ещё {{count}} роль(и/ей)",
|
||||
"BOT_STATS": "**{{votes}}** голосов ([top.gg](https://top.gg))\n**{{servers}}** серверов\n**{{shards}}** шардов\nИспользует **{{lib}}**"
|
||||
"MORE_ROLES": "и ещё {{count}} роль(и/ей)"
|
||||
}
|
|
@ -15,8 +15,6 @@
|
|||
"NO_PERMS": "Недостаточно прав для выполнения данного действия!",
|
||||
"NO_REASON_PROVIDED": "Причина не указана",
|
||||
"NO_USER_FOUND_ID": "Пользователя с ID `{{id}}` не существует!",
|
||||
"VOTE_DM": "⬆️ Привет, {{user}}, спасибо за голос!\nТвоя награда - 50 кредитов (на сервере поддержки)!",
|
||||
"VOTE_LOGS": "⬆️ **{{usertag}}** (`{{userid}}`) проголосовал за **JaBa** и получил **50** кредитов, спасибо!\n<https://discordbots.org/bot/000000000000/vote>",
|
||||
"HELLO_SERVER": "Привет, **{{username}}**, мой префикс на данном сервере - `{{prefix}}`. Используйте `{{prefix}}help`, чтобы получить список команд!",
|
||||
"HELLO_DM": "Привет, так как вы пишите в ЛС, вам не нужно использовать префикс.",
|
||||
"GUILD_ONLY": "Данную команду можно использовать только на сервере!",
|
||||
|
|
|
@ -6,6 +6,5 @@
|
|||
"CLICK": "[**Тик**]({{link}})",
|
||||
"TIP": "Відправте `{{prefix}}invite copy`, щоб отримати посилання для копіювання!",
|
||||
"ADD": "Запросити JaBa",
|
||||
"VOTE": "Проголосувати за JaBa",
|
||||
"SUPPORT": "Підтримати розробника"
|
||||
}
|
|
@ -7,6 +7,5 @@
|
|||
"NO_ROLE": "Немає ролі",
|
||||
"ROLE": "Вища роль",
|
||||
"NO_NICKNAME": "Немає нікнейму",
|
||||
"MORE_ROLES": "і ще {{count}} роль(і/ей)",
|
||||
"BOT_STATS": "**{{votes}}** голосів ([top.gg](https://top.gg))\n**{{servers}}** серверів\n**{{shards }}** шардів\nВикористовує **{{lib}}**"
|
||||
"MORE_ROLES": "і ще {{count}} роль(і/ей)"
|
||||
}
|
|
@ -15,8 +15,6 @@
|
|||
"NO_PERMS": "Недостатньо прав для виконання цієї дії!",
|
||||
"NO_REASON_PROVIDED": "Причина не вказана",
|
||||
"NO_USER_FOUND_ID": "Користувача з ID `{{id}}` не існує!",
|
||||
"VOTE_DM": "⬆️ Привіт, {{user}}, дякую за голос!\nТвоя нагорода - 50 кредитів (на сервері підтримки)!",
|
||||
"VOTE_LOGS": "⬆️ **{{usertag}}** (`{{userid}}`) проголосував за **JaBa** і отримав **50** кредитів, дякую!\n<https://discordbots .org/bot/000000000000/vote>",
|
||||
"HELLO_SERVER": "Привіт, **{{username}}**, мій префікс на даному сервері - `{{prefix}}`. Використовуйте `{{prefix}}help`, щоб отримати список команд!",
|
||||
"HELLO_DM": "Привіт, тому що ви пишете в ОП, вам не потрібно використовувати префікс.",
|
||||
"GUILD_ONLY": "Цю команду можна використовувати лише на сервері!",
|
||||
|
|
|
@ -94,22 +94,6 @@ const checks = [
|
|||
success("Valid blague.xyz key");
|
||||
}
|
||||
}
|
||||
if (!config.apiKeys.dbl) {
|
||||
ignore("DBL API is not configured, key should not be checked.");
|
||||
} else {
|
||||
const res = await fetch("https://top.gg/api/bots/check?userId=test", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: config.apiKeys.dbl
|
||||
}
|
||||
});
|
||||
const result = await res.json();
|
||||
if (result.error && result.error === "Unauthorized") {
|
||||
error("Should be a valid DBL key", "get your key here: https://top.gg/ OR delete the key from the config if you don't have a key");
|
||||
} else {
|
||||
success("Valid DBL key");
|
||||
}
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue