Skip to content

Commit

Permalink
Merge pull request #8 from soratidus999/cogs
Browse files Browse the repository at this point in the history
Return WIki URL on blank search
  • Loading branch information
pvyParts authored Nov 20, 2021
2 parents 1045487 + 5442a21 commit 1b7d1b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion wikijs/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.0.6"
VERSION = "0.0.7"
9 changes: 9 additions & 0 deletions wikijs/cogs/wikijs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ async def wiki(self, ctx):
await ctx.message.add_reaction(chr(0x231B))

search_string = ctx.message.content[6:]
if search_string == "":
embed = Embed(title="WikiJS")
embed.colour = Color.blue()
embed.add_field(
name="Wiki Link",
value=f"{settings.WIKIJS_URL}"
)
await ctx.message.clear_reaction(chr(0x231B))
return await ctx.reply(embed=embed, mention_author=False)

try:
pagesearchresponse = WikiJSManager().search_for_page(search_string)
Expand Down

0 comments on commit 1b7d1b6

Please sign in to comment.