This commit is contained in:
Essem 2022-02-01 16:57:15 -06:00 committed by GitHub
parent a0b2cb062d
commit b69ffe0a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ class PlayCommand extends MusicCommand {
const url = new URL(query); const url = new URL(query);
return await play(this.client, url, this.message, true); return await play(this.client, url, this.message, true);
} catch { } catch {
const search = searchRegex.startsWith("ytsearch:") ? query : !this.args[0] && attachment ? attachment.url : `ytsearch:${query}`; const search = query.startsWith("ytsearch:") ? query : !this.args[0] && attachment ? attachment.url : `ytsearch:${query}`;
return await play(this.client, search, this.message, true); return await play(this.client, search, this.message, true);
} }
} }