From 29822cd0cb43d29e55048e9d3952b424f093a122 Mon Sep 17 00:00:00 2001
From: Toastie <toastie@toastiet0ast.com>
Date: Sun, 15 Dec 2024 20:34:04 +1300
Subject: [PATCH] .banner fixed, will now show guild banner if available,
 otherwise global banner, if available

---
 CHANGELOG.md                              | 6 ++++++
 src/EllieBot/EllieBot.csproj              | 2 +-
 src/EllieBot/Modules/Searches/Searches.cs | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd20f2f..c101366 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
 
 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
 
 ## Changed
diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj
index 815c7ec..4d06b71 100644
--- a/src/EllieBot/EllieBot.csproj
+++ b/src/EllieBot/EllieBot.csproj
@@ -4,7 +4,7 @@
         <Nullable>enable</Nullable>
         <ImplicitUsings>true</ImplicitUsings>
         <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
-        <Version>5.3.1</Version>
+        <Version>5.3.2</Version>
 
         <!-- Output/build -->
         <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs
index 5b4baaf..3a71da6 100644
--- a/src/EllieBot/Modules/Searches/Searches.cs
+++ b/src/EllieBot/Modules/Searches/Searches.cs
@@ -417,7 +417,8 @@ public partial class Searches : EllieModule<SearchesService>
     {
         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)
         {