Skip to content

Commit

Permalink
[Customhelp] Add per-category thumbnails for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
npc203 committed Aug 18, 2024
1 parent d6dab22 commit 4124dc9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions customhelp/themes/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ async def format_category_help(

if await ctx.embed_requested():
emb = await self.embed_template(help_settings, ctx)
emb["thumbnail"] = obj.thumbnail
emb["embed"]["title"] = (
(str(obj.reaction) if obj.reaction else "") + " " + obj.name.capitalize()
)
Expand Down
1 change: 1 addition & 0 deletions customhelp/themes/dank.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async def format_category_help(

if await ctx.embed_requested():
emb = await self.embed_template(help_settings, ctx)
emb["thumbnail"] = obj.thumbnail
emb["embed"]["title"] = (
(str(obj.reaction) if obj.reaction else "") + " " + obj.name.capitalize()
)
Expand Down
1 change: 1 addition & 0 deletions customhelp/themes/danny.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ async def format_category_help(

if await ctx.embed_requested():
emb = await self.embed_template(help_settings, ctx)
emb["thumbnail"] = obj.thumbnail

if description := obj.long_desc:
emb["embed"]["title"] = f"{description[:250]}"
Expand Down
1 change: 1 addition & 0 deletions customhelp/themes/mix.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ async def format_category_help(
return
if await ctx.embed_requested():
emb = await self.embed_template(help_settings, ctx)
emb["thumbnail"] = obj.thumbnail

if description := obj.long_desc:
emb["embed"]["description"] = f"{description[:250]}"
Expand Down
1 change: 1 addition & 0 deletions customhelp/themes/nadeko.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async def format_category_help(

if await ctx.embed_requested():
emb = await self.embed_template(help_settings, ctx)
emb["thumbnail"] = obj.thumbnail
if description := obj.long_desc:
emb["embed"]["description"] = f"{description[:250]}"

Expand Down

0 comments on commit 4124dc9

Please sign in to comment.