Skip to content

Commit

Permalink
extras.py: Add serverbanner command
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenChen committed Jun 4, 2023
1 parent 32e3bf0 commit de0c050
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cogs/extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit de0c050

Please sign in to comment.