From 0d56f57ee55c43afa579b0e28f1ccaefca16e40e Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 13 Jun 2017 14:25:00 +0200 Subject: [PATCH 1/2] fixed? stream notifications --- src/NadekoBot/Services/Searches/StreamNotificationService.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/NadekoBot/Services/Searches/StreamNotificationService.cs b/src/NadekoBot/Services/Searches/StreamNotificationService.cs index 871a680d..3fdbb9ac 100644 --- a/src/NadekoBot/Services/Searches/StreamNotificationService.cs +++ b/src/NadekoBot/Services/Searches/StreamNotificationService.cs @@ -28,10 +28,6 @@ namespace NadekoBot.Services.Searches _db = db; _client = client; _strings = strings; - } - - public StreamNotificationService() - { _streamCheckTimer = new Timer(async (state) => { var oldCachedStatuses = new ConcurrentDictionary(_cachedStatuses); From 1fa23c095aa797623b253bc29a24675540ce9ae4 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 13 Jun 2017 15:40:31 +0200 Subject: [PATCH 2/2] Fixed missing key --- src/NadekoBot/Modules/Searches/Searches.cs | 3 +++ src/NadekoBot/_strings/ResponseStrings.en-US.json | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 6f05d846..8e1b2a2c 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -515,7 +515,10 @@ namespace NadekoBot.Modules.Searches var sense = data.Results.FirstOrDefault(x => x.Senses?[0].Definition != null)?.Senses[0]; if (sense?.Definition == null) + { + await ReplyErrorLocalized("define_unknown").ConfigureAwait(false); return; + } var definition = sense.Definition.ToString(); if (!(sense.Definition is string)) diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 22dd8050..82dcf6ad 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -446,6 +446,7 @@ "music_skipped_to": "Skipped to `{0}:{1}`", "music_songs_shuffled": "Songs shuffled", "music_song_moved": "Song moved", + "music_song_not_found": "No song found.", "music_time_format": "{0}h {1}m {2}s", "music_to_position": "To position", "music_unlimited": "unlimited", @@ -522,6 +523,7 @@ "searches_cost": "Cost", "searches_date": "Date", "searches_define": "Define:", + "searches_define_unknown": "Can't find the definition for that term.", "searches_dropped": "Dropped", "searches_episodes": "Episodes", "searches_error_occured": "Error occurred.",