mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
Фиксики
This commit is contained in:
parent
cf171f5ccb
commit
7c5655b0ef
5 changed files with 40 additions and 13 deletions
29
TO REWRITE/Economy/importmee6.js
Normal file
29
TO REWRITE/Economy/importmee6.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
const { getUserXp } = require("mee6-levels-api");
|
||||
const Command = require("../../base/Command"),
|
||||
Discord = require("discord.js");
|
||||
|
||||
class ImportMee6 extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "money",
|
||||
dirname: __dirname,
|
||||
enabled: true,
|
||||
guildOnly: true,
|
||||
aliases: [],
|
||||
memberPermissions: [],
|
||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||||
nsfw: false,
|
||||
ownerOnly: false,
|
||||
cooldown: 1000
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, args, data) {
|
||||
await getUserXp(message.guild.id, message.author.id).then(user => {
|
||||
Levels.setLevel(message.author.id, message.guild.id, user.level);
|
||||
message.lineReply(`Ваш уровень Mee6 синхронизирован! Новый уровень - ${user.level}`);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = ImportMee6;
|
|
@ -51,7 +51,7 @@ class JaBa extends Client {
|
|||
|
||||
this.discordTogether = new DiscordTogether(this);
|
||||
|
||||
playdl.getFreeClientID().then((clientID) => {
|
||||
playdl.getFreeClientID().then(clientID => {
|
||||
playdl.setToken({
|
||||
soundcloud: {
|
||||
client_id: clientID
|
||||
|
@ -60,12 +60,6 @@ class JaBa extends Client {
|
|||
});
|
||||
|
||||
this.player = new Player(this);
|
||||
// ytdlOptions: {
|
||||
// filter: "audioonly",
|
||||
// highWaterMark: 1 << 30,
|
||||
// dlChunkSize: 0,
|
||||
// liveBuffer: 4900
|
||||
// }
|
||||
this.player.use("jaba", extractor);
|
||||
|
||||
this.player
|
||||
|
|
|
@ -35,7 +35,7 @@ class Queue extends BaseCommand {
|
|||
if (!queue) return interaction.error("music/play:NOT_PLAYING");
|
||||
|
||||
const currentTrack = queue.current;
|
||||
const tracks = queue.tracks.slice(0, 10).map((track, i) => {
|
||||
const tracks = queue.tracks.slice(0, 5).map((track, i) => {
|
||||
return `${i + 1}. [${track.title}](${track.url})\n> ${interaction.translate("music/queue:ADDED")} ${track.requestedBy}`;
|
||||
});
|
||||
|
||||
|
@ -48,11 +48,15 @@ class Queue extends BaseCommand {
|
|||
.addFields(
|
||||
{
|
||||
name: interaction.translate("music/nowplaying:CURRENTLY_PLAYING"),
|
||||
value: `[${currentTrack.title}](${currentTrack.url})\n> ${interaction.translate("music/queue:ADDED")} ${currentTrack.requestedBy}`
|
||||
value: `[${currentTrack.title}](${currentTrack.url})\n> ${interaction.translate("music/queue:ADDED")} ${currentTrack.requestedBy}\n`
|
||||
},
|
||||
{
|
||||
name: interaction.translate("music/queue:QUEUE"),
|
||||
value: tracks.join("\n")
|
||||
},
|
||||
{
|
||||
name: "\u200b",
|
||||
value: `${tracks.join("\n")}\n${interaction.translate("music/queue:MORE", {
|
||||
value: `${interaction.translate("music/queue:MORE", {
|
||||
tracks: `${queue.tracks.length - tracks.length} ${client.getNoun(queue.tracks.length - tracks.length, interaction.translate("misc:NOUNS:TRACKS:1"), interaction.translate("misc:NOUNS:TRACKS:2"), interaction.translate("misc:NOUNS:TRACKS:5"))}`
|
||||
})}`
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ class Skip extends BaseCommand {
|
|||
.setAuthor({
|
||||
name: interaction.translate("music/skip:SUCCESS")
|
||||
})
|
||||
.setThumbnail(queue.tracks[1].thumbnail)
|
||||
.setThumbnail(queue.tracks[1].thumbnail || null)
|
||||
.setDescription(interaction.translate("music/play:NOW_PLAYING", {
|
||||
songName: queue.tracks[1].name
|
||||
songName: queue.tracks[1].title
|
||||
}))
|
||||
.setFooter({
|
||||
text: client.config.embed.footer
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"DESCRIPTION": "Показать очередь на воспроизведение",
|
||||
"USAGE": "queue",
|
||||
"EXAMPLES": "queue",
|
||||
"TITLE": "Очередь",
|
||||
"QUEUE": "Очередь",
|
||||
"ADDED": "Добавил",
|
||||
"MORE": "и ещё {{tracks}}"
|
||||
}
|
Loading…
Reference in a new issue