Skip to content

Commit

Permalink
Simple source command
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
xnomas committed Jan 4, 2022
1 parent 11678d9 commit b3637bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions JHDBot/cogs/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,20 @@ async def attach_embed_info(self, ctx=None, embed=None):
embed.set_footer(text="by: JHD Moderation team ")
return embed

# Send github link
@commands.command(
name="source", help="JHDBot github link."
)
async def source(self, ctx):
if await self.pre_invoke(ctx):
if (
str(ctx.message.channel) == "bot-commands"
):
emb = discord.Embed(description=strings.url, colour=0xFF002A)
await self.attach_embed_info(ctx, emb)
await ctx.send(embed=emb)
else:
await ctx.send("Please use this command in `#bot-commands`")

def setup(bot):
bot.add_cog(GeneralCog(bot))
Expand Down
4 changes: 4 additions & 0 deletions JHDBot/cogs/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@
`#katana`
Discuss and coordinate work on Katana Modules here.
"""

url = """
**https://github.com/Fumenoid/JHDBot**
"""

0 comments on commit b3637bd

Please sign in to comment.