Фиксики

This commit is contained in:
JonnyBro 2022-08-04 23:52:31 +05:00
parent cf171f5ccb
commit 7c5655b0ef
5 changed files with 40 additions and 13 deletions

View 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;

View file

@ -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

View file

@ -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"))}`
})}`
}

View file

@ -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

View file

@ -2,7 +2,7 @@
"DESCRIPTION": "Показать очередь на воспроизведение",
"USAGE": "queue",
"EXAMPLES": "queue",
"TITLE": "Очередь",
"QUEUE": "Очередь",
"ADDED": "Добавил",
"MORE": "и ещё {{tracks}}"
}