Fix interaction response object issue, fix soundplayer voice state detection
This commit is contained in:
parent
ab2d6e2ef0
commit
7c9f22cd34
3 changed files with 19 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue