mirror of
https://github.com/Myxelium/Lunaris2.0.git
synced 2026-04-13 08:00:37 +00:00
Compare commits
1 Commits
Require-us
...
0.1.9
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e2c10a7ea |
@@ -45,10 +45,17 @@ public class PlayHandler : IRequestHandler<PlayCommand>
|
|||||||
|
|
||||||
async void PlayMusic()
|
async void PlayMusic()
|
||||||
{
|
{
|
||||||
await _audioService.StartAsync(cancellationToken);
|
|
||||||
var context = command.Message;
|
var context = command.Message;
|
||||||
_context = context;
|
_context = context;
|
||||||
|
|
||||||
|
if ((context.User as SocketGuildUser)?.VoiceChannel == null)
|
||||||
|
{
|
||||||
|
await context.SendMessageAsync("You must be in a voice channel to use this command.", _client);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await _audioService.StartAsync(cancellationToken);
|
||||||
|
|
||||||
var searchQuery = context.GetOptionValueByName(Option.Input);
|
var searchQuery = context.GetOptionValueByName(Option.Input);
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(searchQuery))
|
if (string.IsNullOrWhiteSpace(searchQuery))
|
||||||
|
|||||||
Reference in New Issue
Block a user