Фиксы

This commit is contained in:
JonnyBro 2022-01-04 21:22:41 +05:00
parent 50f84d317b
commit f177e409f1
3 changed files with 4 additions and 5 deletions

View file

@ -23,7 +23,7 @@ class AutoPlay extends Command {
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
if (!queue) return message.error("music/play:NOT_PLAYING"); if (!queue) return message.error("music/play:NOT_PLAYING");
const autoplay = queue.toggleAutoplay() const autoplay = queue.toggleAutoplay();
message.success(`music/autoplay:SUCCESS_${autoplay ? "ENABLED" : "DISABLED"}`); message.success(`music/autoplay:SUCCESS_${autoplay ? "ENABLED" : "DISABLED"}`);
} }

View file

@ -33,7 +33,7 @@ class Np extends Command {
queue.repeatMode queue.repeatMode
? queue.repeatMode === 2 ? queue.repeatMode === 2
? "Очереди" ? "Очереди"
: "Текущей песни" : "Трека"
: "Выкл" : "Выкл"
}\` | Автовоспроизведение: \`${queue.autoplay ? "Вкл" : "Выкл"}\``; }\` | Автовоспроизведение: \`${queue.autoplay ? "Вкл" : "Выкл"}\``;

View file

@ -18,11 +18,10 @@ class Play extends Command {
} }
async run(message, args) { async run(message, args) {
const name = args.join(" ");
if (!name) return message.error("music/play:MISSING_SONG_NAME");
const voice = message.member.voice.channel; const voice = message.member.voice.channel;
const name = args.join(" ");
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
if (!name) return message.error("music/play:MISSING_SONG_NAME");
// Check my permissions // Check my permissions
const perms = voice.permissionsFor(this.client.user); const perms = voice.permissionsFor(this.client.user);