Skip to content

Commit

Permalink
hopefully fix board command
Browse files Browse the repository at this point in the history
  • Loading branch information
eip618 committed Feb 6, 2025
1 parent 52f2cad commit 9f8a7de
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cogs/assistancehardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,20 @@ async def fix(self, ctx: KurisuContext, console=''):
async def board(self, ctx: KurisuContext, console=''):
"""Board diagram for the given console."""
console = console.lower()
embed = discord.Embed(color=discord.Color.blue())

if console in boards.keys():
await ctx.send(ctx, "", image_link=boards[console])
embed.set_image(url=boards[console])
elif console in alias.keys():
await ctx.send(ctx, "", image_link=boards[alias[console]])
embed.set_image(url=boards[alias[console]])
else:
await ctx.send(f'{ctx.author.mention}, Board options are `' + ', '.join(boards) + "`", delete_after=10)
embed.description = f'{ctx.author.mention}, Board options are `' + ', '.join(boards) + "`"
embed.color = discord.Color.red()
await ctx.send(embed=embed, delete_after=10)
return

embed.title = f"Board Diagram: {console.capitalize()}"
await ctx.send(embed=embed)


add_md_files_as_commands(AssistanceHardware, join(AssistanceHardware.data_dir, 'hardware'),
Expand Down

0 comments on commit 9f8a7de

Please sign in to comment.