From 939cdf109efd178250e6d28dd9aa8cd4da8e26c5 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Mon, 17 Jan 2022 13:20:49 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D0=B0=D1=8F=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D1=8F=20Distube=20=D0=B8=20discord.js=20?= =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=B4=D0=B0=20fml=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BE=D0=B9=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20Dis?= =?UTF-8?q?tube?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/JaBa.js | 16 +++++++++---- commands/Fun/fml.js | 39 -------------------------------- commands/Music/play.js | 6 ++++- dashboard/public/docs/updates.md | 7 ++++-- package.json | 8 +++---- 5 files changed, 26 insertions(+), 50 deletions(-) delete mode 100644 commands/Fun/fml.js diff --git a/base/JaBa.js b/base/JaBa.js index 8ea99383..6d1473aa 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -58,13 +58,21 @@ class JaBa extends Client { }; this.player = new DisTube.default(this, { + plugins: [ + new SpotifyPlugin({ + emitEventsAfterFetching: true + }), + new SoundCloudPlugin() + ], + emitNewSongOnly: true, + leaveOnEmpty: true, + leaveOnFinish: true, + leaveOnStop: false, searchSongs: 10, searchCooldown: 30, - leaveOnEmpty: true, emptyCooldown: 0, - leaveOnFinish: true, - leaveOnStop: true, - plugins: [new SoundCloudPlugin(), new SpotifyPlugin()], + emitAddListWhenCreatingQueue: false, + emitAddSongWhenCreatingQueue: false }); this.player diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js deleted file mode 100644 index c19a59c0..00000000 --- a/commands/Fun/fml.js +++ /dev/null @@ -1,39 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Fml extends Command { - constructor(client) { - super(client, { - name: "fml", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: [], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message, args, data) { - if (!this.client.config.apiKeys.blagueXYZ) return message.error("misc:COMMAND_DISABLED"); - - // const fml = await this.client.joker.randomVDM(null, data.guild.language.substr(0, 2)); - const fml = await this.client.joker.randomVDM(null, "en"); - - const embed = new Discord.MessageEmbed() - .setDescription(fml.content) - .setFooter({ - text: message.translate("fun/fml:FOOTER") - }) - .setColor(data.config.embed.color); - - message.channel.send({ - embeds: [embed] - }); - } -} - -module.exports = Fml; \ No newline at end of file diff --git a/commands/Music/play.js b/commands/Music/play.js index 1fa98543..8ae57349 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -28,7 +28,11 @@ class Play extends Command { if (!perms.has(Permissions.FLAGS.CONNECT) || !perms.has(Permissions.FLAGS.SPEAK)) return message.error("music/play:VOICE_CHANNEL_CONNECT"); try { - this.client.player.play(message, args.join(" ")); + this.client.player.play(message.member.voice.channel, args.join(" "), { + member: message.member, + textChannel: message.channel, + message + }); } catch (e) { message.error("music/play:ERR_OCCURRED", { error: e diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index 687d967d..2b3d921c 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -2,6 +2,9 @@ * Исправления * Команда *backup* теперь работает нормально. +* Удалено + * Команда *fml*. + ### JaBa v3.2.8 * Добавлено * Статистика сервера на сайте ([пример](https://jaba.pp.ua/stats/651412418202959872)). @@ -43,7 +46,7 @@ ### JaBa v3.2.2 Hotfix * Исправления - * В *profile* и money снова показываются кредиты со всех серверов. + * В *profile* и *money* снова показываются кредиты со всех серверов. ### JaBa v3.2.2 > Спасибо Добрый Спецназ#8801 за идеи. @@ -60,7 +63,7 @@ * Отображение статуса в *userinfo*. * Отображение эмбеда в *giveaway*. * Примечания - * В *giveaway* появилась возможность сделать раздачу дропом. + * В *giveaway* появилась возможность сделать раздачу **дропом**. Дроп - как только количество участников будет равно указанному вами количеству победителей раздача сразу же заканчивается. Победителями будут все, кто успел поставить реакцию. diff --git a/package.json b/package.json index 9f8b4044..b1c0c76e 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "dependencies": { "@discordjs/opus": "^0.7.0", "@discordjs/voice": "^0.7.5", - "@distube/soundcloud": "^1.0.0", - "@distube/spotify": "^1.0.0", + "@distube/soundcloud": "^1.1.0", + "@distube/spotify": "^1.1.0", "@k3rn31p4nic/google-translate-api": "github:k3rn31p4nic/google-translate-api", "@sentry/node": "6.3.6", "@sindresorhus/slugify": "^1.1.0", @@ -32,8 +32,8 @@ "discord-giveaways": "github:Androz2091/discord-giveaways#develop", "discord-paginationembed": "github:gazmull/discord-paginationembed#v3", "discord-together": "^1.3.25", - "discord.js": "^13.5.1", - "distube": "^3.0.7", + "discord.js": "^13.6.0", + "distube": "^3.1.1", "ejs": "^3.1.3", "express": "^4.17.1", "express-session": "^1.17.0",