mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14: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);
|
this.discordTogether = new DiscordTogether(this);
|
||||||
|
|
||||||
playdl.getFreeClientID().then((clientID) => {
|
playdl.getFreeClientID().then(clientID => {
|
||||||
playdl.setToken({
|
playdl.setToken({
|
||||||
soundcloud: {
|
soundcloud: {
|
||||||
client_id: clientID
|
client_id: clientID
|
||||||
|
@ -60,12 +60,6 @@ class JaBa extends Client {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.player = new Player(this);
|
this.player = new Player(this);
|
||||||
// ytdlOptions: {
|
|
||||||
// filter: "audioonly",
|
|
||||||
// highWaterMark: 1 << 30,
|
|
||||||
// dlChunkSize: 0,
|
|
||||||
// liveBuffer: 4900
|
|
||||||
// }
|
|
||||||
this.player.use("jaba", extractor);
|
this.player.use("jaba", extractor);
|
||||||
|
|
||||||
this.player
|
this.player
|
||||||
|
|
|
@ -35,7 +35,7 @@ class Queue extends BaseCommand {
|
||||||
if (!queue) return interaction.error("music/play:NOT_PLAYING");
|
if (!queue) return interaction.error("music/play:NOT_PLAYING");
|
||||||
|
|
||||||
const currentTrack = queue.current;
|
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}`;
|
return `${i + 1}. [${track.title}](${track.url})\n> ${interaction.translate("music/queue:ADDED")} ${track.requestedBy}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -48,11 +48,15 @@ class Queue extends BaseCommand {
|
||||||
.addFields(
|
.addFields(
|
||||||
{
|
{
|
||||||
name: interaction.translate("music/nowplaying:CURRENTLY_PLAYING"),
|
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",
|
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"))}`
|
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({
|
.setAuthor({
|
||||||
name: interaction.translate("music/skip:SUCCESS")
|
name: interaction.translate("music/skip:SUCCESS")
|
||||||
})
|
})
|
||||||
.setThumbnail(queue.tracks[1].thumbnail)
|
.setThumbnail(queue.tracks[1].thumbnail || null)
|
||||||
.setDescription(interaction.translate("music/play:NOW_PLAYING", {
|
.setDescription(interaction.translate("music/play:NOW_PLAYING", {
|
||||||
songName: queue.tracks[1].name
|
songName: queue.tracks[1].title
|
||||||
}))
|
}))
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: client.config.embed.footer
|
text: client.config.embed.footer
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"DESCRIPTION": "Показать очередь на воспроизведение",
|
"DESCRIPTION": "Показать очередь на воспроизведение",
|
||||||
"USAGE": "queue",
|
"USAGE": "queue",
|
||||||
"EXAMPLES": "queue",
|
"EXAMPLES": "queue",
|
||||||
"TITLE": "Очередь",
|
"QUEUE": "Очередь",
|
||||||
"ADDED": "Добавил",
|
"ADDED": "Добавил",
|
||||||
"MORE": "и ещё {{tracks}}"
|
"MORE": "и ещё {{tracks}}"
|
||||||
}
|
}
|
Loading…
Reference in a new issue