diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 5baa7c6e..02bf9993 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -690,7 +690,7 @@ namespace NadekoBot.Modules.Music return; } IUserMessage msg = null; - try { msg = await ReplyConfirmLocalized("attempting_to_queue", Format.Bold(mpl.Songs.Count.ToString())).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { msg = await Context.Channel.SendMessageAsync(GetText("attempting_to_queue", Format.Bold(mpl.Songs.Count.ToString()))).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } foreach (var item in mpl.Songs) { var usr = (IGuildUser)Context.User; diff --git a/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs index d371330c..c615ef1e 100644 --- a/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Utility/Commands/MessageRepeater.cs @@ -44,7 +44,8 @@ namespace NadekoBot.Modules.Utility Channel = channel; Guild = NadekoBot.Client.GetGuild(repeater.GuildId); - Task.Run(Run); + if(Guild!=null) + Task.Run(Run); } @@ -127,7 +128,9 @@ namespace NadekoBot.Modules.Utility await Task.Delay(5000).ConfigureAwait(false); Repeaters = new ConcurrentDictionary>(NadekoBot.AllGuildConfigs .ToDictionary(gc => gc.GuildId, - gc => new ConcurrentQueue(gc.GuildRepeaters.Select(gr => new RepeatRunner(gr))))); + gc => new ConcurrentQueue(gc.GuildRepeaters + .Select(gr => new RepeatRunner(gr)) + .Where(x => x.Guild != null)))); _ready = true; }); }