mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
fix: .banner will now show a 'no banner' error, and will use image embed instead of thumbnail to show the banner. Only user server banners will be shown for now, global user banners will still not work.
This commit is contained in:
@@ -419,13 +419,22 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
|
||||
var bannerUrl = usr.GetGuildBannerUrl();
|
||||
|
||||
if (bannerUrl is null)
|
||||
{
|
||||
await Response()
|
||||
.Error(strs.no_banner)
|
||||
.SendAsync();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await Response()
|
||||
.Embed(
|
||||
CreateEmbed()
|
||||
.WithOkColor()
|
||||
.AddField("Username", usr.ToString())
|
||||
.AddField("Banner Url", bannerUrl)
|
||||
.WithThumbnailUrl(bannerUrl))
|
||||
.AddField("Username", usr.ToString(), true)
|
||||
.AddField("Banner Url", bannerUrl, true)
|
||||
.WithImageUrl(bannerUrl))
|
||||
.SendAsync();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user