Merge branch 'v4' into v5

This commit is contained in:
Kwoth
2023-03-05 02:15:39 +01:00
39 changed files with 751 additions and 506 deletions

View File

@@ -39,7 +39,7 @@ public partial class Searches
[Cmd]
public async Task MagicItem()
{
if (!_service.WowJokes.Any())
if (!_service.MagicItems.Any())
{
await ReplyErrorLocalizedAsync(strs.magicitems_not_loaded);
return;

View File

@@ -1,4 +1,4 @@
#nullable disable
#nullable disable
using Microsoft.Extensions.Caching.Memory;
using NadekoBot.Modules.Administration.Services;
using NadekoBot.Modules.Searches.Common;
@@ -199,7 +199,7 @@ public partial class Searches : NadekoModule<SearchesService>
if (!await ValidateQuery(ffs))
return;
var shortenedUrl = await _google.ShortenUrl($"https://lmgtfy.com/?q={Uri.EscapeDataString(ffs)}");
var shortenedUrl = await _google.ShortenUrl($"https://letmegooglethat.com/?q={Uri.EscapeDataString(ffs)}");
await SendConfirmAsync($"<{shortenedUrl}>");
}
@@ -325,7 +325,7 @@ public partial class Searches : NadekoModule<SearchesService>
return _eb.Create()
.WithOkColor()
.WithUrl(item.Permalink)
.WithAuthor(item.Word)
.WithTitle(item.Word)
.WithDescription(item.Definition);
},
items.Length,
@@ -612,4 +612,4 @@ public partial class Searches : NadekoModule<SearchesService>
[JsonProperty("result_url")]
public string ResultUrl { get; set; }
}
}
}

View File

@@ -36,7 +36,7 @@ public partial class SearchesConfig : ICloneable<SearchesConfig>
- `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property
""")]
public YoutubeSearcher YtProvider { get; set; } = YoutubeSearcher.Ytdl;
public YoutubeSearcher YtProvider { get; set; } = YoutubeSearcher.Ytdlp;
[Comment("""
Set the searx instance urls in case you want to use 'searx' for either img or web search.