.banner fixed, will now show guild banner if available, otherwise global banner, if available

This commit is contained in:
Toastie 2024-12-15 20:34:04 +13:00
parent 75f5cfde29
commit 29822cd0cb
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
3 changed files with 9 additions and 2 deletions

View file

@ -2,6 +2,12 @@
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
## [5.3.2] - 14.12.2024
## Fixed
- `.banner` should be working properly now with both server and global user banners
## [5.3.1] - 13.12.2024 ## [5.3.1] - 13.12.2024
## Changed ## Changed

View file

@ -4,7 +4,7 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings> <ImplicitUsings>true</ImplicitUsings>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages> <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Version>5.3.1</Version> <Version>5.3.2</Version>
<!-- Output/build --> <!-- Output/build -->
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory> <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>

View file

@ -417,7 +417,8 @@ public partial class Searches : EllieModule<SearchesService>
{ {
usr ??= (IGuildUser)ctx.User; usr ??= (IGuildUser)ctx.User;
var bannerUrl = usr.GetGuildBannerUrl(size: 2048); var bannerUrl = usr.GetGuildBannerUrl(size: 2048)
?? (await ((DiscordSocketClient)ctx.Client).Rest.GetUserAsync(usr.Id))?.GetBannerUrl();
if (bannerUrl is null) if (bannerUrl is null)
{ {