mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
v3.4.6
This commit is contained in:
parent
6964ec9e47
commit
7762cd124f
16 changed files with 24 additions and 204 deletions
|
@ -1,52 +0,0 @@
|
|||
const Command = require("../../base/Command"),
|
||||
Discord = require("discord.js"),
|
||||
fetch = require("node-fetch");
|
||||
|
||||
class Github extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "github",
|
||||
dirname: __dirname,
|
||||
enabled: false,
|
||||
guildOnly: false,
|
||||
aliases: ["git"],
|
||||
memberPermissions: [],
|
||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||||
nsfw: false,
|
||||
ownerOnly: false,
|
||||
cooldown: 1000
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, args, data) {
|
||||
const res = await fetch("https://api.github.com/repos/JonnyBro/JaBa");
|
||||
const json = await res.json();
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setAuthor({
|
||||
name: this.client.user.tag,
|
||||
iconURL: this.client.user.displayAvatarURL({
|
||||
size: 512,
|
||||
dynamic: true,
|
||||
format: "png"
|
||||
})
|
||||
})
|
||||
.setDescription(`[${message.translate("general/github:CLICK_HERE")}](${json.html_url})`)
|
||||
.addField("Название", json.name, true)
|
||||
.addField("Звёзды", json.stargazers_count, true)
|
||||
.addField("Форки", json.forks_count, true)
|
||||
.addField(message.translate("general/github:LANGUAGE"), json.language, true)
|
||||
.addField(message.translate("general/github:OWNER"), `[${json.owner.login}](${json.owner.html_url})`)
|
||||
.setImage(json.owner.avatar_url)
|
||||
.setColor(data.config.embed.color)
|
||||
.setFooter({
|
||||
text: data.config.embed.footer
|
||||
});
|
||||
|
||||
message.reply({
|
||||
embeds: [embed]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Github;
|
|
@ -1,54 +0,0 @@
|
|||
const Command = require("../../base/Command"),
|
||||
Discord = require("discord.js"),
|
||||
fetch = require("node-fetch");
|
||||
|
||||
class Hastebin extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "hastebin",
|
||||
dirname: __dirname,
|
||||
enabled: true,
|
||||
guildOnly: false,
|
||||
aliases: ["hb"],
|
||||
memberPermissions: [],
|
||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||||
nsfw: false,
|
||||
ownerOnly: false,
|
||||
cooldown: 1000
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, args, data) {
|
||||
const content = args.join(" ");
|
||||
if (!content) return message.error("general/hastebin:MISSING_TEXT");
|
||||
|
||||
try {
|
||||
const res = await fetch("https://hastebin.com/documents", {
|
||||
method: "POST",
|
||||
body: content,
|
||||
headers: {
|
||||
"Content-Type": "text/plain"
|
||||
}
|
||||
});
|
||||
|
||||
const json = await res.json();
|
||||
if (!json.key) return message.error("misc:ERR_OCCURRED");
|
||||
|
||||
const url = `https://hastebin.com/${json.key}.js`;
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setAuthor({
|
||||
name: message.translate("general/hastebin:SUCCESS")
|
||||
})
|
||||
.setDescription(url)
|
||||
.setColor(data.config.embed.color);
|
||||
message.reply({
|
||||
embeds: [embed]
|
||||
});
|
||||
} catch (e) {
|
||||
message.error("misc:ERR_OCCURRED");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Hastebin;
|
|
@ -1,10 +1,10 @@
|
|||
const Command = require("../../base/Command"),
|
||||
Discord = require("discord.js");
|
||||
|
||||
class Invitations extends Command {
|
||||
class Invites extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "invitations",
|
||||
name: "invites",
|
||||
dirname: __dirname,
|
||||
enabled: true,
|
||||
guildOnly: true,
|
||||
|
@ -28,16 +28,16 @@ class Invitations extends Command {
|
|||
|
||||
if (memberInvites.size <= 0) {
|
||||
if (member === message.member) {
|
||||
return message.error("general/invitations:NOBODY_AUTHOR");
|
||||
return message.error("general/invites:NOBODY_AUTHOR");
|
||||
} else {
|
||||
return message.error("general/invitations:NOBODY_MEMBER", {
|
||||
return message.error("general/invites:NOBODY_MEMBER", {
|
||||
member: member.user.tag
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const content = memberInvites.map((i) => {
|
||||
return message.translate("general/invitations:CODE", {
|
||||
return message.translate("general/invites:CODE", {
|
||||
uses: i.uses,
|
||||
code: i.code,
|
||||
channel: i.channel.toString()
|
||||
|
@ -52,16 +52,16 @@ class Invitations extends Command {
|
|||
text: data.config.embed.footer
|
||||
})
|
||||
.setAuthor({
|
||||
name: message.translate("general/invitations:TRACKER")
|
||||
name: message.translate("general/invites:TRACKER")
|
||||
})
|
||||
.setDescription(message.translate("general/invitations:TITLE", {
|
||||
.setDescription(message.translate("general/invites:TITLE", {
|
||||
member: member.user.tag,
|
||||
guild: message.guild.name
|
||||
}))
|
||||
.addField(message.translate("general/invitations:FIELD_INVITED"), message.translate("general/invitations:FIELD_MEMBERS", {
|
||||
.addField(message.translate("general/invites:FIELD_INVITED"), message.translate("general/invites:FIELD_MEMBERS", {
|
||||
total: index
|
||||
}))
|
||||
.addField(message.translate("general/invitations:FIELD_CODES"), content);
|
||||
.addField(message.translate("general/invites:FIELD_CODES"), content);
|
||||
|
||||
message.reply({
|
||||
embeds: [embed]
|
||||
|
@ -69,4 +69,4 @@ class Invitations extends Command {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = Invitations;
|
||||
module.exports = Invites;
|
|
@ -1,39 +0,0 @@
|
|||
const Command = require("../../base/Command"),
|
||||
Discord = require("discord.js");
|
||||
|
||||
class Someone extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "someone",
|
||||
dirname: __dirname,
|
||||
enabled: false,
|
||||
guildOnly: true,
|
||||
aliases: ["somebody"],
|
||||
memberPermissions: [],
|
||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||||
nsfw: false,
|
||||
ownerOnly: false,
|
||||
cooldown: 1000
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, args, data) {
|
||||
const member = message.guild.members.cache.random(1)[0];
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.addField(message.translate("common:USERNAME"), member.user.username, true)
|
||||
.addField(message.translate("common:DISCRIMINATOR"), member.user.discriminator, true)
|
||||
.addField(message.translate("common:ID"), member.user.id, true)
|
||||
.setThumbnail(member.user.displayAvatarURL({
|
||||
size: 512,
|
||||
dynamic: true,
|
||||
format: "png"
|
||||
}))
|
||||
.setColor(data.config.embed.color);
|
||||
message.reply({
|
||||
embeds: [embed]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Someone;
|
|
@ -1,3 +1,10 @@
|
|||
### JaBa v3.4.6
|
||||
* Изменено
|
||||
* Команда *invitations* переименована в *invites*.
|
||||
|
||||
* Удалено
|
||||
* Команды *github*, *hastebin*, *someone*.
|
||||
|
||||
### JaBa v3.4.5
|
||||
* Добавлено
|
||||
* Команда *memes* - Получить мем с выбранного или случайного сабреддита.
|
||||
|
|
|
@ -31,8 +31,6 @@ module.exports = class {
|
|||
else return message.sendT("misc:HELLO_DM");
|
||||
}
|
||||
|
||||
if (message.content.includes("@someone") && message.guild && client.commands.get("someone").conf.enabled) return client.commands.get("someone").run(message, null, data);
|
||||
|
||||
if (message.guild) {
|
||||
const memberData = await client.findOrCreateMember({
|
||||
id: message.author.id,
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Показать информацию о GitHub репозитории старой версии JaBa!",
|
||||
"USAGE": "{{prefix}}github",
|
||||
"EXAMPLES": "{{prefix}}github",
|
||||
"CLICK_HERE": "Нажмите сюда, чтобы открыть ссылку",
|
||||
"LANGUAGE": "Язык",
|
||||
"OWNER": "Владелец репозитория"
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Опубликовать ваш текст на Hastebin!",
|
||||
"USAGE": "{{prefix}}hastebin [текст]",
|
||||
"EXAMPLES": "{{prefix}}hastebin Hello World!",
|
||||
"MISSING_TEXT": "Введите текст!",
|
||||
"SUCCESS": "Успешно опубликовано!"
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"DESCRIPTION": "Показать кол-во пользователей которых пользователь пригласил на сервер!",
|
||||
"USAGE": "{{prefix}}invitations (@пользователь)",
|
||||
"EXAMPLES": "{{prefix}}invitations\n{{prefix}}invitations @Jonny_Bro#4226",
|
||||
"USAGE": "{{prefix}}invites (@пользователь)",
|
||||
"EXAMPLES": "{{prefix}}invites\n{{prefix}}invites @Jonny_Bro#4226",
|
||||
"NOBODY_AUTHOR": "Вы никого не пригласили на сервер!",
|
||||
"NOBODY_MEMBER": "{{member}} никого не приглашал(а) на сервер!",
|
||||
"CODE": "**{{code}}** ({{uses}} использований) | {{channel}}",
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Выбрать случайного участника на сервере!",
|
||||
"USAGE": "{{prefix}}someone",
|
||||
"EXAMPLES": "{{prefix}}someone"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Показати інформацію про GitHub репозиторії старої версії JaBa!",
|
||||
"USAGE": "{{prefix}}github",
|
||||
"EXAMPLES": "{{prefix}}github",
|
||||
"CLICK_HERE": "Натисніть сюди, щоб відкрити посилання",
|
||||
"LANGUAGE": "Мова",
|
||||
"OWNER": "Власник репозиторію"
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Опублікувати текст на Hastebin!",
|
||||
"USAGE": "{{prefix}}hastebin [текст]",
|
||||
"EXAMPLES": "{{prefix}}hastebin Hello World!",
|
||||
"MISSING_TEXT": "Введіть текст!",
|
||||
"SUCCESS": "Успішно опубліковано!"
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"DESCRIPTION": "Показати кількість користувачів, яких користувач запросив на сервер!",
|
||||
"USAGE": "{{prefix}}invitations (@користувач)",
|
||||
"EXAMPLES": "{{prefix}}invitations\n{{prefix}}invitations @Jonny_Bro#4226",
|
||||
"USAGE": "{{prefix}}invites (@користувач)",
|
||||
"EXAMPLES": "{{prefix}}invites\n{{prefix}}invites @Jonny_Bro#4226",
|
||||
"NOBODY_AUTHOR": "Ви нікого не запросили на сервер!",
|
||||
"NOBODY_MEMBER": "{{member}} нікого не запрошував(а) на сервер!",
|
||||
"CODE": "**{{code}}** ({{uses}} використань) | {{channel}}",
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Вибрати випадкового учасника на сервері!",
|
||||
"USAGE": "{{prefix}}someone",
|
||||
"EXAMPLES": "{{prefix}}someone"
|
||||
}
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "jaba",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.6",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "jaba",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@discordjs/opus": "^0.7.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "jaba",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.6",
|
||||
"description": "A very complete Discord bot (more than 100 commands) that uses the Discord.js",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
|
|
Loading…
Reference in a new issue