Skip to content

Commit

Permalink
[Fix] Added Auto search engine for play
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Nov 17, 2021
1 parent 6eea49d commit 67c7e75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commands/Music/play.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { embedMessage } = require("../../modules/embedSimple");
const playdl = require("play-dl");
const { QueryType } = require("discord-player");

module.exports = {
name: "play",
Expand Down Expand Up @@ -57,6 +58,7 @@ module.exports = {

const searchSong = await client.player.search(songString, {
requestedBy: message.member.user,
searchEngine: QueryType.AUTO,
});

if (!searchSong.tracks.length || !searchSong)
Expand Down Expand Up @@ -244,6 +246,7 @@ module.exports = {
const songString = interaction.options.getString("song");
const searchSong = await client.player.search(songString, {
requestedBy: interaction.user,
searchEngine: QueryType.AUTO,
});

if (!searchSong.tracks.length || !searchSong)
Expand Down

0 comments on commit 67c7e75

Please sign in to comment.