Skip to content

Commit

Permalink
Small audio fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PSMGoossens committed Jun 17, 2021
1 parent 9642f4d commit 8e1f9a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ISurvivalBot/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class User

public bool IsAdmin { get; set; }

public string Discriminator { get; set; }
//public string Discriminator { get; set; }


}
Expand Down
7 changes: 4 additions & 3 deletions ISurvivalBot/Services/AudioService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public async Task<AudioServiceStatus> PlaySound(IGuild guild, IMessageChannel ch
FileName = "ffmpeg",
Arguments = $"-hide_banner -loglevel panic -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1",
RedirectStandardOutput = true,
UseShellExecute = false
UseShellExecute = false,
CreateNoWindow = true
};


Expand Down Expand Up @@ -193,9 +194,9 @@ public async Task<AudioServiceStatus> ListAudio(ICommandContext context)
public async Task<AudioServiceStatus> StopPlaying(IGuild guild, IVoiceChannel voiceChannel) {

AudioServiceState audioState = await getAudioState(guild);
if (audioState == null || audioState.IsPlaying)
if (audioState == null || !audioState.IsPlaying)
{
Console.WriteLine("Is already playing");
Console.WriteLine("Is not joined or not playing anything");
return AudioServiceStatus.Failure;
}
if (voiceChannel.Guild.Id != guild.Id)
Expand Down

0 comments on commit 8e1f9a5

Please sign in to comment.