.btr and .sclr added, cleanup

This commit is contained in:
Toastie 2024-11-28 01:06:01 +13:00
parent 97094dbe5d
commit b411e8cb25
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
119 changed files with 9181 additions and 664 deletions
src/EllieBot/Modules/Searches

View file

@ -39,7 +39,7 @@ public partial class Searches : EllieModule<SearchesService>
if (!await ValidateQuery(query))
return;
var embed = _sender.CreateEmbed();
var embed = CreateEmbed();
var data = await _service.GetWeatherDataAsync(query);
if (data is null)
@ -102,7 +102,7 @@ public partial class Searches : EllieModule<SearchesService>
return;
}
var eb = _sender.CreateEmbed()
var eb = CreateEmbed()
.WithOkColor()
.WithTitle(GetText(strs.time_new))
.WithDescription(Format.Code(data.Time.ToString(Culture)))
@ -128,7 +128,7 @@ public partial class Searches : EllieModule<SearchesService>
}
await Response()
.Embed(_sender.CreateEmbed()
.Embed(CreateEmbed()
.WithOkColor()
.WithTitle(movie.Title)
.WithUrl($"https://www.imdb.com/title/{movie.ImdbId}/")
@ -161,7 +161,7 @@ public partial class Searches : EllieModule<SearchesService>
private Task InternalRandomImage(SearchesService.ImageTag tag)
{
var url = _service.GetRandomImageUrl(tag);
return Response().Embed(_sender.CreateEmbed().WithOkColor().WithImageUrl(url)).SendAsync();
return Response().Embed(CreateEmbed().WithOkColor().WithImageUrl(url)).SendAsync();
}
[Cmd]
@ -190,7 +190,7 @@ public partial class Searches : EllieModule<SearchesService>
}
await Response()
.Embed(_sender.CreateEmbed()
.Embed(CreateEmbed()
.WithOkColor()
.AddField(GetText(strs.original_url), $"<{query}>")
.AddField(GetText(strs.short_url), $"<{shortLink}>"))
@ -213,7 +213,7 @@ public partial class Searches : EllieModule<SearchesService>
return;
}
var embed = _sender.CreateEmbed()
var embed = CreateEmbed()
.WithOkColor()
.WithTitle(card.Name)
.WithDescription(card.Description)
@ -246,7 +246,7 @@ public partial class Searches : EllieModule<SearchesService>
return;
}
var embed = _sender.CreateEmbed().WithOkColor().WithImageUrl(card.Img);
var embed = CreateEmbed().WithOkColor().WithImageUrl(card.Img);
if (!string.IsNullOrWhiteSpace(card.Flavor))
embed.WithDescription(card.Flavor);
@ -280,7 +280,7 @@ public partial class Searches : EllieModule<SearchesService>
.Page((items, _) =>
{
var item = items[0];
return _sender.CreateEmbed()
return CreateEmbed()
.WithOkColor()
.WithUrl(item.Permalink)
.WithTitle(item.Word)
@ -311,7 +311,7 @@ public partial class Searches : EllieModule<SearchesService>
.Page((items, _) =>
{
var model = items.First();
var embed = _sender.CreateEmbed()
var embed = CreateEmbed()
.WithDescription(ctx.User.Mention)
.AddField(GetText(strs.word), model.Word, true)
.AddField(GetText(strs._class), model.WordType, true)
@ -374,7 +374,7 @@ public partial class Searches : EllieModule<SearchesService>
}
[Cmd]
public async Task Color(params Color[] colors)
public async Task Color(params Rgba32[] colors)
{
if (!colors.Any())
return;
@ -403,7 +403,7 @@ public partial class Searches : EllieModule<SearchesService>
await Response()
.Embed(
_sender.CreateEmbed()
CreateEmbed()
.WithOkColor()
.AddField("Username", usr.ToString())
.AddField("Avatar Url", avatarUrl)