diff --git a/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs b/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs index e5ca4bc5..3cd0d58b 100644 --- a/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs +++ b/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs @@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Music.Common private readonly Thread _player; public IVoiceChannel VoiceChannel { get; private set; } - private readonly ITextChannel _originalTextChannel; + public ITextChannel OriginalTextChannel { get; set; } private readonly Logger _log; private MusicQueue Queue { get; } = new MusicQueue(); @@ -140,12 +140,16 @@ namespace NadekoBot.Modules.Music.Common _log = LogManager.GetCurrentClassLogger(); this.Volume = volume; this.VoiceChannel = vch; - this._originalTextChannel = original; + this.OriginalTextChannel = original; this.SongCancelSource = new CancellationTokenSource(); if(ms.MusicChannelId is ulong cid) { this.OutputTextChannel = ((SocketGuild)original.Guild).GetTextChannel(cid) ?? original; } + else + { + this.OutputTextChannel = original; + } this._musicService = musicService; this._google = google; @@ -666,7 +670,7 @@ namespace NadekoBot.Modules.Music.Common public void SetMusicChannelToOriginal() { - this.OutputTextChannel = _originalTextChannel; + this.OutputTextChannel = OriginalTextChannel; } //// this should be written better diff --git a/NadekoBot.Core/Modules/Music/Music.cs b/NadekoBot.Core/Modules/Music/Music.cs index f012daec..11ff8f3d 100644 --- a/NadekoBot.Core/Modules/Music/Music.cs +++ b/NadekoBot.Core/Modules/Music/Music.cs @@ -921,7 +921,7 @@ namespace NadekoBot.Modules.Music { var mp = await _service.GetOrCreatePlayer(Context); - mp.OutputTextChannel = null; + mp.OutputTextChannel = mp.OriginalTextChannel; _service.SetMusicChannel(Context.Guild.Id, null); await ReplyConfirmLocalized("unset_music_channel").ConfigureAwait(false);