mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
all calls to .WithAuthor and .WithFooter no longer use their respective builders
This commit is contained in:
@@ -28,12 +28,10 @@ namespace NadekoBot.Modules.Searches
|
||||
private const string _pogiURL = "https://pathofexile.gamepedia.com/api.php?action=query&prop=imageinfo&iiprop=url&format=json&titles=File:";
|
||||
private const string _profileURL = "https://www.pathofexile.com/account/view-profile/";
|
||||
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly IHttpClientFactory _httpFactory;
|
||||
|
||||
public PathOfExileCommands(DiscordSocketClient client, IHttpClientFactory httpFactory)
|
||||
public PathOfExileCommands(IHttpClientFactory httpFactory)
|
||||
{
|
||||
_client = client;
|
||||
_httpFactory = httpFactory;
|
||||
}
|
||||
|
||||
@@ -77,10 +75,10 @@ namespace NadekoBot.Modules.Searches
|
||||
await ctx.SendPaginatedConfirmAsync(page, (curPage) =>
|
||||
{
|
||||
var embed = new EmbedBuilder()
|
||||
.WithAuthor(eau => eau.WithName($"Characters on {usr}'s account")
|
||||
.WithUrl($"{_profileURL}{usr}")
|
||||
.WithIconUrl("https://web.poecdn.com/image/favicon/ogimage.png"))
|
||||
.WithOkColor();
|
||||
.WithAuthor($"Characters on {usr}'s account",
|
||||
"https://web.poecdn.com/image/favicon/ogimage.png",
|
||||
$"{_profileURL}{usr}")
|
||||
.WithOkColor();
|
||||
|
||||
var tempList = characters.Skip(curPage * 9).Take(9).ToList();
|
||||
|
||||
@@ -131,9 +129,9 @@ namespace NadekoBot.Modules.Searches
|
||||
}
|
||||
|
||||
var embed = new EmbedBuilder()
|
||||
.WithAuthor(eau => eau.WithName($"Path of Exile Leagues")
|
||||
.WithUrl("https://www.pathofexile.com")
|
||||
.WithIconUrl("https://web.poecdn.com/image/favicon/ogimage.png"))
|
||||
.WithAuthor($"Path of Exile Leagues",
|
||||
"https://web.poecdn.com/image/favicon/ogimage.png",
|
||||
"https://www.pathofexile.com")
|
||||
.WithOkColor();
|
||||
|
||||
var sb = new System.Text.StringBuilder();
|
||||
@@ -203,9 +201,10 @@ namespace NadekoBot.Modules.Searches
|
||||
conversionEquivalent = float.Parse(currencyOutput["chaosEquivalent"].ToString(), System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
var embed = new EmbedBuilder().WithAuthor(eau => eau.WithName($"{leagueName} Currency Exchange")
|
||||
.WithUrl("http://poe.ninja")
|
||||
.WithIconUrl("https://web.poecdn.com/image/favicon/ogimage.png"))
|
||||
var embed = new EmbedBuilder()
|
||||
.WithAuthor($"{leagueName} Currency Exchange",
|
||||
"https://web.poecdn.com/image/favicon/ogimage.png",
|
||||
"http://poe.ninja")
|
||||
.AddField("Currency Type", cleanCurrency, true)
|
||||
.AddField($"{cleanConvert} Equivalent", chaosEquivalent / conversionEquivalent, true)
|
||||
.WithOkColor();
|
||||
|
@@ -33,7 +33,6 @@ namespace NadekoBot.Modules.Searches
|
||||
private readonly IGoogleApiService _google;
|
||||
private readonly IHttpClientFactory _httpFactory;
|
||||
private readonly IMemoryCache _cache;
|
||||
private static readonly NadekoRandom _rng = new NadekoRandom();
|
||||
private readonly GuildTimezoneService _tzSvc;
|
||||
|
||||
public Searches(IBotCredentials creds, IGoogleApiService google, IHttpClientFactory factory, IMemoryCache cache,
|
||||
@@ -46,7 +45,6 @@ namespace NadekoBot.Modules.Searches
|
||||
_tzSvc = tzSvc;
|
||||
}
|
||||
|
||||
//for anonymasen :^)
|
||||
[NadekoCommand, Aliases]
|
||||
public async Task Rip([Leftover] IGuildUser usr)
|
||||
{
|
||||
@@ -224,9 +222,9 @@ namespace NadekoBot.Modules.Searches
|
||||
var res = await _google.GetImageAsync(oterms).ConfigureAwait(false);
|
||||
var embed = new EmbedBuilder()
|
||||
.WithOkColor()
|
||||
.WithAuthor(eab => eab.WithName(GetText("image_search_for") + " " + oterms.TrimTo(50))
|
||||
.WithUrl("https://www.google.rs/search?q=" + query + "&source=lnms&tbm=isch")
|
||||
.WithIconUrl("http://i.imgur.com/G46fm8J.png"))
|
||||
.WithAuthor(GetText("image_search_for") + " " + oterms.TrimTo(50),
|
||||
"http://i.imgur.com/G46fm8J.png",
|
||||
$"https://www.google.rs/search?q={query}&source=lnms&tbm=isch")
|
||||
.WithDescription(res.Link)
|
||||
.WithImageUrl(res.Link)
|
||||
.WithTitle(ctx.User.ToString());
|
||||
@@ -254,9 +252,9 @@ namespace NadekoBot.Modules.Searches
|
||||
|
||||
var embed = new EmbedBuilder()
|
||||
.WithOkColor()
|
||||
.WithAuthor(eab => eab.WithName(GetText("image_search_for") + " " + oterms.TrimTo(50))
|
||||
.WithUrl(fullQueryLink)
|
||||
.WithIconUrl("http://s.imgur.com/images/logo-1200-630.jpg?"))
|
||||
.WithAuthor(GetText("image_search_for") + " " + oterms.TrimTo(50),
|
||||
"http://s.imgur.com/images/logo-1200-630.jpg?",
|
||||
fullQueryLink)
|
||||
.WithDescription(source)
|
||||
.WithImageUrl(source)
|
||||
.WithTitle(ctx.User.ToString());
|
||||
@@ -474,7 +472,7 @@ namespace NadekoBot.Modules.Searches
|
||||
var item = items[p];
|
||||
return new EmbedBuilder().WithOkColor()
|
||||
.WithUrl(item.Permalink)
|
||||
.WithAuthor(eab => eab.WithIconUrl("http://i.imgur.com/nwERwQE.jpg").WithName(item.Word))
|
||||
.WithAuthor(item.Word)
|
||||
.WithDescription(item.Definition);
|
||||
}, items.Length, 1).ConfigureAwait(false);
|
||||
return;
|
||||
|
@@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Searches
|
||||
var comic = JsonConvert.DeserializeObject<XkcdComic>(res);
|
||||
var embed = new EmbedBuilder().WithColor(Bot.OkColor)
|
||||
.WithImageUrl(comic.ImageLink)
|
||||
.WithAuthor(eab => eab.WithName(comic.Title).WithUrl($"{_xkcdUrl}/{comic.Num}").WithIconUrl("https://xkcd.com/s/919f27.ico"))
|
||||
.WithAuthor(comic.Title,"https://xkcd.com/s/919f27.ico", $"{_xkcdUrl}/{comic.Num}")
|
||||
.AddField(GetText("comic_number"), comic.Num.ToString(), true)
|
||||
.AddField(GetText("date"), $"{comic.Month}/{comic.Year}", true);
|
||||
var sent = await ctx.Channel.EmbedAsync(embed)
|
||||
@@ -69,11 +69,13 @@ namespace NadekoBot.Modules.Searches
|
||||
var res = await http.GetStringAsync($"{_xkcdUrl}/{num}/info.0.json").ConfigureAwait(false);
|
||||
|
||||
var comic = JsonConvert.DeserializeObject<XkcdComic>(res);
|
||||
var embed = new EmbedBuilder().WithColor(Bot.OkColor)
|
||||
.WithImageUrl(comic.ImageLink)
|
||||
.WithAuthor(eab => eab.WithName(comic.Title).WithUrl($"{_xkcdUrl}/{num}").WithIconUrl("https://xkcd.com/s/919f27.ico"))
|
||||
.AddField(GetText("comic_number"), comic.Num.ToString(), true)
|
||||
.AddField(GetText("date"), $"{comic.Month}/{comic.Year}", true);
|
||||
var embed = new EmbedBuilder()
|
||||
.WithColor(Bot.OkColor)
|
||||
.WithImageUrl(comic.ImageLink)
|
||||
.WithAuthor(comic.Title, "https://xkcd.com/s/919f27.ico", $"{_xkcdUrl}/{num}")
|
||||
.AddField(GetText("comic_number"), comic.Num.ToString(), true)
|
||||
.AddField(GetText("date"), $"{comic.Month}/{comic.Year}", true);
|
||||
|
||||
var sent = await ctx.Channel.EmbedAsync(embed)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
|
Reference in New Issue
Block a user