diff --git a/cogs/extras.py b/cogs/extras.py index bc54af1c9..5a5ecc188 100644 --- a/cogs/extras.py +++ b/cogs/extras.py @@ -734,6 +734,16 @@ async def servericon(self, ctx: GuildContext): embed.set_image(url=ctx.guild.icon.url) await ctx.send(embed=embed, ephemeral=True) + @commands.guild_only() + @commands.hybrid_command() + async def serverbanner(self, ctx: GuildContext): + """Sends embed with the server's banner.""" + if ctx.guild.banner is None: + return await ctx.send("This server has no banner set.", ephemeral=True) + embed = discord.Embed(title=f"{ctx.guild.name} Banner") + embed.set_image(url=ctx.guild.banner.url) + await ctx.send(embed=embed, ephemeral=True) + @commands.guild_only() @commands.command(name='close', aliases=['solved']) async def close_thread(self, ctx: GuildContext):