Fix interaction response object issue, fix soundplayer voice state detection

This commit is contained in:
Essem 2022-10-04 13:23:23 -05:00
parent ab2d6e2ef0
commit 7c9f22cd34
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
3 changed files with 19 additions and 17 deletions

View file

@ -19,10 +19,10 @@ class PlayCommand extends MusicCommand {
}
try {
const url = new URL(query);
return await play(this.client, url, { channel: this.channel, member: this.member, type: this.type, interaction: this.interaction }, true);
return play(this.client, url, { channel: this.channel, member: this.member, type: this.type, interaction: this.interaction }, true);
} catch {
const search = prefixes.some(v => query.startsWith(v)) ? query : !query && attachment ? attachment.url : `ytsearch:${query}`;
return await play(this.client, search, { channel: this.channel, member: this.member, type: this.type, interaction: this.interaction }, true);
return play(this.client, search, { channel: this.channel, member: this.member, type: this.type, interaction: this.interaction }, true);
}
}