my play command don't work
See original GitHub issuehello in my bot i have added a command “play”
let queue = await client.player.getQueue(message.guild.id).lenght;
if(!message.member.voiceChannel) return message.channel.send("❌ | Error: You're not in a voice channel !")
if(!args[0]) return message.channel.send("❌ | Error: please add a music name !")
if(queue > 30) return message.channel.send("🛑 | Error: you can't add more than 30 music, please subscribe to the premium to increase this limit")
if(client.player.isPlaying(message.guild.id)){
let song = await client.player.addToQueue(message.guild.id, args[0]);
const embedok = new Discord.RichEmbed()
.setDescription(`__**✅ Added to queue 🎶**__\n » ${song.name}`)
.setAuthor(`requested by ${message.author.tag}`, message.author.avatarURL)
.setTimestamp()
message.channel.send(embedok)
} else {
let song = await client.player.play(message.member.voiceChannel, args[0])
const embedok1 = new Discord.RichEmbed()
.setDescription(`__**✅ Now playing 🎶**__\n » ${song.name}`)
.setTimestamp()
message.channel.send(embedok1)
}
but this don’t work
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Unable to run "play" command - java - Stack Overflow
The Answer: The command "play" alone is not the full command. You need to add new, run, or help after it. (Important: You...
Read more >/played command not working? : r/wow - Reddit
I've recently bought the subscription with 2 of my friends and I've levelled way more than my friends, so I wanted to check...
Read more >"Play the News" command not working - Google Assistant ...
I have a Pixel 3XL and for a couple of months the "Play the News" command keeps breaking. Assistant says "Playing the latest...
Read more >Why does my /play and /sc command not work - Hypixel
So for my /sc command to check stats quickly in Duels, when I do it, it does nothing, no message in chat, noe...
Read more >Dfplayer mini play command does not work - Arduino Forum
Anyone got an MP3 player & code that works? Help with coding a DFMiniPlayer with Arduino and a Button. Help Needed For My...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can add this:
if(!message.member.voice.channel) return message.channel.send('you are not in a vc!');
Replace this
exports.run = (client, message, args) => {
withexports.run = async (client, message, args) => {