aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/play.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/play.ts b/src/commands/play.ts
index c301fe9..a67b318 100644
--- a/src/commands/play.ts
+++ b/src/commands/play.ts
@@ -4,7 +4,7 @@ import {TYPES} from '../types';
import {inject, injectable} from 'inversify';
import {QueuedSong, STATUS} from '../services/player';
import PlayerManager from '../managers/player';
-import {getMostPopularVoiceChannel} from '../utils/channels';
+import {getMostPopularVoiceChannel, getMemberVoiceChannel} from '../utils/channels';
import LoadingMessage from '../utils/loading-message';
import errorMsg from '../utils/error-msg';
import Command from '.';
@@ -36,8 +36,8 @@ export default class implements Command {
this.getSongs = getSongs;
}
- public async execute(msg: Message, args: string []): Promise<void> {
- const [targetVoiceChannel] = getMostPopularVoiceChannel(msg.guild!);
+ public async execute(msg: Message, args: string[]): Promise<void> {
+ const [targetVoiceChannel] = getMemberVoiceChannel(msg.member!) ?? getMostPopularVoiceChannel(msg.guild!);
const res = new LoadingMessage(msg.channel as TextChannel);
await res.start();